Skip to content

Commit 04af0c4

Browse files
test(flaky): Log checkExpiring failure (#1018)
Add simple logging mechanism on checkExpiring failure.
1 parent eb0890c commit 04af0c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/helpers.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ proc checkExpiringInternal(cond: proc(): bool {.raises: [], gcsafe.} ): Future[b
122122
await sleepAsync(1.millis)
123123

124124
template checkExpiring*(code: untyped): untyped =
125-
check await checkExpiringInternal(proc(): bool = code)
125+
let result = await checkExpiringInternal(proc(): bool = code)
126+
assert result, "[TIMEOUT] Test failed due to the check timeout. Consider adjusting it."
126127

127128
proc unorderedCompare*[T](a, b: seq[T]): bool =
128129
if a == b:

0 commit comments

Comments
 (0)