tests: Run mutation source tests on memtable

This commit is contained in:
Tomasz Grabiec
2015-07-19 18:36:08 +02:00
parent f9da612581
commit 440962dbbf
2 changed files with 27 additions and 0 deletions

View File

@@ -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',

View 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();
});
});
}