mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-04 14:33:09 +00:00
Reinstate unittest > unittest2, move eventually to ./asynctest
This commit is contained in:
parent
50bbf8ac31
commit
e970989205
@ -1,3 +1,13 @@
|
||||
import pkg/asynctest/chronos/unittest
|
||||
import pkg/asynctest/chronos/unittest2
|
||||
|
||||
export unittest
|
||||
export unittest2 except eventually
|
||||
|
||||
template eventually*(expression: untyped, timeout = 5000, pollInterval = 10): bool =
|
||||
## Fast defaults, do not use with HTTP connections!
|
||||
eventually(expression, timeout, pollInterval)
|
||||
|
||||
template eventuallySafe*(
|
||||
expression: untyped, timeout = 5000, pollInterval = 1000
|
||||
): bool =
|
||||
## More sane defaults, for use with HTTP connections
|
||||
eventually(expression, timeout = timeout, pollInterval = pollInterval)
|
||||
|
||||
@ -38,7 +38,3 @@ proc allFuturesThrowing*[T, E]( # https://github.com/nim-lang/Nim/issues/23432
|
||||
): Future[void] =
|
||||
allFuturesThrowing(futs.mapIt(FutureBase(it)))
|
||||
|
||||
template eventuallySafe*(
|
||||
expression: untyped, timeout = 5000, pollInterval = 1000
|
||||
): bool =
|
||||
eventually(expression, timeout, pollInterval)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import pkg/codex/streams/storestream
|
||||
import std/unittest
|
||||
import pkg/unittest2
|
||||
|
||||
# From lip2p/tests/helpers
|
||||
const trackerNames = [StoreStreamTrackerName]
|
||||
|
||||
2
vendor/asynctest
vendored
2
vendor/asynctest
vendored
@ -1 +1 @@
|
||||
Subproject commit 32df0f19d6e0e6f84c762cf8de7361ddb419f4ba
|
||||
Subproject commit 73c08f77afc5cc2a5628d00f915b97bf72f70c9b
|
||||
Loading…
x
Reference in New Issue
Block a user