1#include <test/nodestore/TestBase.h>
2#include <test/unit_test/SuiteJournal.h>
4#include <xrpl/basics/ByteUtilities.h>
5#include <xrpl/basics/rocksdb.h>
6#include <xrpl/beast/utility/temp_dir.h>
7#include <xrpl/nodestore/DummyScheduler.h>
8#include <xrpl/nodestore/Manager.h>
25 int numObjsToTest = 2000)
33 params.
set(
"type", type);
34 params.
set(
"path", tempDir.
path());
47 params,
megabytes(4), scheduler, journal);
72 params,
megabytes(4), scheduler, journal);
94#if XRPL_ROCKSDB_AVAILABLE
98#ifdef XRPL_ENABLE_SQLITE_BACKEND_TESTS
RAII temporary directory.
std::string path() const
Get the native path for the temporary directory.
testcase_t testcase
Memberspace for declaring test cases.
void testBackend(std::string const &type, std::uint64_t const seedValue, int numObjsToTest=2000)
void run() override
Runs the suite.
A backend used for the NodeStore.
Simple NodeStore Scheduler that just peforms the tasks synchronously.
virtual std::unique_ptr< Backend > make_Backend(Section const ¶meters, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal)=0
Create a backend.
static Manager & instance()
Returns the instance of the manager singleton.
static Batch createPredictableBatch(int numObjects, std::uint64_t seed)
static bool areBatchesEqual(Batch const &lhs, Batch const &rhs)
void fetchCopyOfBatch(Backend &backend, Batch *pCopy, Batch const &batch)
void storeBatch(Backend &backend, Batch const &batch)
Holds a collection of configuration values.
void set(std::string const &key, std::string const &value)
Set a key/value pair.
A namespace for easy access to logging severity values.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr auto megabytes(T value) noexcept
Binary function that satisfies the strict-weak-ordering requirement.