mirror of https://github.com/vacp2p/nim-libp2p.git
test(flaky): Log checkExpiring failure (#1018)
Add simple logging mechanism on checkExpiring failure.
This commit is contained in:
parent
eb0890cd6f
commit
04af0c4323
|
@ -122,7 +122,8 @@ proc checkExpiringInternal(cond: proc(): bool {.raises: [], gcsafe.} ): Future[b
|
|||
await sleepAsync(1.millis)
|
||||
|
||||
template checkExpiring*(code: untyped): untyped =
|
||||
check await checkExpiringInternal(proc(): bool = code)
|
||||
let result = await checkExpiringInternal(proc(): bool = code)
|
||||
assert result, "[TIMEOUT] Test failed due to the check timeout. Consider adjusting it."
|
||||
|
||||
proc unorderedCompare*[T](a, b: seq[T]): bool =
|
||||
if a == b:
|
||||
|
|
Loading…
Reference in New Issue