fixup databuffer

This commit is contained in:
Jaremy Creechley 2023-09-26 16:13:11 -07:00
parent 555f1fe77a
commit 61e8fd4904
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

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