From 0dbe3eca5b2e7192c0f54a25c465b7dcaaf17deb Mon Sep 17 00:00:00 2001 From: twmht Date: Mon, 19 Jun 2017 13:59:31 +0800 Subject: [PATCH] add testcase for memtable --- rocksdb/tests/test_memtable.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rocksdb/tests/test_memtable.py diff --git a/rocksdb/tests/test_memtable.py b/rocksdb/tests/test_memtable.py new file mode 100644 index 0000000..cb8cb80 --- /dev/null +++ b/rocksdb/tests/test_memtable.py @@ -0,0 +1,18 @@ +# content of test_sample.py +import rocksdb +import pytest +import shutil +import os + +def test_open_skiplist_memtable_factory(): + opts = rocksdb.Options() + opts.memtable_factory = rocksdb.SkipListMemtableFactory() + opts.create_if_missing = True + test_db = rocksdb.DB("/tmp/test", opts) + +def test_open_vector_memtable_factory(): + opts = rocksdb.Options() + opts.allow_concurrent_memtable_write = False + opts.memtable_factory = rocksdb.VectorMemtableFactory() + opts.create_if_missing = True + test_db = rocksdb.DB("/tmp/test", opts)