add testcase for memtable
This commit is contained in:
parent
8382523ac4
commit
0dbe3eca5b
1 changed files with 18 additions and 0 deletions
18
rocksdb/tests/test_memtable.py
Normal file
18
rocksdb/tests/test_memtable.py
Normal file
|
@ -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)
|
Loading…
Reference in a new issue