logos-storage-nim/tests/asynctest.nim
Eric 8fcd97738d
fix eventually symbol resolution
Because `eventuallySafe` calls the symbol `eventually`, it should be declared before `proc eventually` is declared to avoid ambiguous symbol lookups.
2025-06-05 15:58:11 +10:00

14 lines
464 B
Nim

import pkg/asynctest/chronos/unittest2
export unittest2 except eventually
template eventuallySafe*(
expression: untyped, timeout = 5000, pollInterval = 1000
): bool =
## More sane defaults, for use with HTTP connections
eventually(expression, timeout, pollInterval)
template eventually*(expression: untyped, timeout = 5000, pollInterval = 10): bool =
## Fast defaults, do not use with HTTP connections!
eventually(expression, timeout, pollInterval)