use all() for futures and track connections
This commit is contained in:
parent
86e1c8169c
commit
4c191866e4
|
@ -83,6 +83,7 @@ proc testPubSubDaemonPublish(gossip: bool = false,
|
|||
let smsg = cast[string](data)
|
||||
check smsg == pubsubData
|
||||
times.inc()
|
||||
echo "TIMES ", times
|
||||
if times >= count and not finished:
|
||||
finished = true
|
||||
|
||||
|
@ -107,6 +108,7 @@ proc testPubSubDaemonPublish(gossip: bool = false,
|
|||
|
||||
await wait(publisher(), 5.minutes) # should be plenty of time
|
||||
|
||||
echo "HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
|
||||
result = true
|
||||
await nativeNode.stop()
|
||||
await allFutures(awaiters)
|
||||
|
@ -142,6 +144,7 @@ proc testPubSubNodePublish(gossip: bool = false,
|
|||
let smsg = cast[string](message.data)
|
||||
check smsg == pubsubData
|
||||
times.inc()
|
||||
echo "TIMES ", times
|
||||
if times >= count and not finished:
|
||||
finished = true
|
||||
result = true # don't cancel subscription
|
||||
|
@ -353,6 +356,7 @@ suite "Interop":
|
|||
check line == test
|
||||
await conn.writeLp(cast[seq[byte]](test))
|
||||
count.inc()
|
||||
echo "COUNT ", count
|
||||
|
||||
testFuture.complete(count)
|
||||
await conn.close()
|
||||
|
|
Loading…
Reference in New Issue