20 #include <ripple/beast/utility/temp_dir.h>
21 #include <ripple/nodestore/DummyScheduler.h>
22 #include <ripple/nodestore/Manager.h>
23 #include <ripple/unity/rocksdb.h>
25 #include <test/nodestore/TestBase.h>
26 #include <test/unit_test/SuiteJournal.h>
41 int numObjsToTest = 2000)
45 testcase(
"Backend type=" + type);
49 params.
set(
"type", type);
50 params.
set(
"path", tempDir.
path());
63 params,
megabytes(4), scheduler, journal);
88 params,
megabytes(4), scheduler, journal);
110 #if RIPPLE_ROCKSDB_AVAILABLE
114 #ifdef RIPPLE_ENABLE_SQLITE_BACKEND_TESTS
Simple NodeStore Scheduler that just peforms the tasks synchronously.
Holds a collection of configuration values.
void testBackend(std::string const &type, std::uint64_t const seedValue, int numObjsToTest=2000)
Binary function that satisfies the strict-weak-ordering requirement.
A namespace for easy access to logging severity values.
static bool areBatchesEqual(Batch const &lhs, Batch const &rhs)
BEAST_DEFINE_TESTSUITE(Backend, ripple_core, ripple)
constexpr auto megabytes(T value) noexcept
void fetchCopyOfBatch(Backend &backend, Batch *pCopy, Batch const &batch)
std::string path() const
Get the native path for the temporary directory.
static Batch createPredictableBatch(int numObjects, std::uint64_t seed)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void set(std::string const &key, std::string const &value)
Set a key/value pair.
virtual std::unique_ptr< Backend > make_Backend(Section const ¶meters, std::size_t burstSize, Scheduler &scheduler, beast::Journal journal)=0
Create a backend.
void storeBatch(Backend &backend, Batch const &batch)
static Manager & instance()
Returns the instance of the manager singleton.
RAII temporary directory.