mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-07 16:13:07 +00:00
fixup databuffer
This commit is contained in:
parent
555f1fe77a
commit
61e8fd4904
@ -48,28 +48,28 @@ suite "Test Basic ThreadDatastore with SQLite":
|
|||||||
|
|
||||||
basicStoreTests(ds, key, bytes, otherBytes)
|
basicStoreTests(ds, key, bytes, otherBytes)
|
||||||
|
|
||||||
suite "Test Query ThreadDatastore with SQLite":
|
# suite "Test Query ThreadDatastore with SQLite":
|
||||||
|
|
||||||
var
|
# var
|
||||||
sqlStore: SQLiteBackend[KeyId,DataBuffer]
|
# sqlStore: SQLiteBackend[KeyId,DataBuffer]
|
||||||
ds: ThreadDatastore
|
# ds: ThreadDatastore
|
||||||
taskPool: Taskpool
|
# taskPool: Taskpool
|
||||||
key = Key.init("/a/b").tryGet()
|
# key = Key.init("/a/b").tryGet()
|
||||||
bytes = "some bytes".toBytes
|
# bytes = "some bytes".toBytes
|
||||||
otherBytes = "some other bytes".toBytes
|
# otherBytes = "some other bytes".toBytes
|
||||||
|
|
||||||
setup:
|
# setup:
|
||||||
sqlStore = newSQLiteBackend[KeyId, DataBuffer](Memory).tryGet()
|
# sqlStore = newSQLiteBackend[KeyId, DataBuffer](Memory).tryGet()
|
||||||
taskPool = Taskpool.new(NumThreads)
|
# taskPool = Taskpool.new(NumThreads)
|
||||||
ds = ThreadDatastore.new(sqlStore, tp = taskPool).tryGet()
|
# ds = ThreadDatastore.new(sqlStore, tp = taskPool).tryGet()
|
||||||
|
|
||||||
teardown:
|
# teardown:
|
||||||
GC_fullCollect()
|
# GC_fullCollect()
|
||||||
|
|
||||||
(await ds.close()).tryGet()
|
# (await ds.close()).tryGet()
|
||||||
taskPool.shutdown()
|
# taskPool.shutdown()
|
||||||
|
|
||||||
queryTests(ds, true)
|
# queryTests(ds, true)
|
||||||
|
|
||||||
# suite "Test Basic ThreadDatastore with fsds":
|
# suite "Test Basic ThreadDatastore with fsds":
|
||||||
# let
|
# let
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user