tests: Run mutation source tests on memtable
This commit is contained in:
@@ -128,6 +128,7 @@ urchin_tests = [
|
||||
'tests/test-serialization',
|
||||
'tests/urchin/sstable_test',
|
||||
'tests/urchin/sstable_mutation_test',
|
||||
'tests/urchin/memtable_test',
|
||||
'tests/urchin/commitlog_test',
|
||||
'tests/cartesian_product_test',
|
||||
'tests/urchin/hash_test',
|
||||
|
||||
26
tests/urchin/memtable_test.cc
Normal file
26
tests/urchin/memtable_test.cc
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2015 Cloudius Systems
|
||||
*/
|
||||
|
||||
#define BOOST_TEST_DYN_LINK
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include "tests/test-utils.hh"
|
||||
|
||||
#include "core/thread.hh"
|
||||
#include "memtable.hh"
|
||||
#include "mutation_source_test.hh"
|
||||
|
||||
SEASTAR_TEST_CASE(test_memtable_conforms_to_mutation_source) {
|
||||
return seastar::async([] {
|
||||
run_mutation_source_tests([](schema_ptr s, const std::vector<mutation>& partitions) {
|
||||
auto mt = make_lw_shared<memtable>(s);
|
||||
|
||||
for (auto&& m : partitions) {
|
||||
mt->apply(m);
|
||||
}
|
||||
|
||||
return mt->as_data_source();
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user