mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-02-06 13:44:56 +00:00
increase tolerance of simple heartbeat
test (#1034)
This commit is contained in:
parent
53e3825e07
commit
bd6ead95ef
@ -22,10 +22,10 @@ when not defined(macosx):
|
|||||||
asyncTest "simple heartbeat":
|
asyncTest "simple heartbeat":
|
||||||
var i = 0
|
var i = 0
|
||||||
proc t() {.async.} =
|
proc t() {.async.} =
|
||||||
heartbeat "shouldn't see this", 30.milliseconds:
|
heartbeat "shouldn't see this", 50.milliseconds:
|
||||||
i.inc()
|
i.inc()
|
||||||
let hb = t()
|
let hb = t()
|
||||||
await sleepAsync(300.milliseconds)
|
await sleepAsync(500.milliseconds)
|
||||||
await hb.cancelAndWait()
|
await hb.cancelAndWait()
|
||||||
check:
|
check:
|
||||||
i in 9..11
|
i in 9..11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user