mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-05 07:03:12 +00:00
add tests for new ds'es
This commit is contained in:
parent
619d3e9d56
commit
24ce85e49b
@ -51,7 +51,7 @@ proc waitForAllQueryResults*(qi: ?!QueryIter): Future[?!seq[QueryResponse]] {.as
|
||||
|
||||
proc waitForAllQueryResults*(iter: Future[?!QueryIter]): Future[?!seq[QueryResponse]] {.async.} =
|
||||
let res = await iter
|
||||
await waitForAllQueryResults(res)
|
||||
return await waitForAllQueryResults(res)
|
||||
|
||||
proc defaultDispose(): Future[?!void] {.upraises: [], gcsafe, async.} =
|
||||
return success()
|
||||
|
||||
@ -25,6 +25,9 @@ suite "Datastore (base)":
|
||||
|
||||
test "query":
|
||||
expect Defect:
|
||||
let iter = tryGet(await waitForAllQueryResults ds.query(Query.init(key)))
|
||||
for n in iter:
|
||||
let
|
||||
q = Query.init(key)
|
||||
all = waitForAllQueryResults(await ds.query(q))
|
||||
res = tryGet(await all)
|
||||
for n in res:
|
||||
discard
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user