From 4c191866e4d6776ef3a67faf62e0f1eb2e9cfce9 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sat, 23 May 2020 11:14:22 -0600 Subject: [PATCH] use all() for futures and track connections --- tests/testinterop.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testinterop.nim b/tests/testinterop.nim index c33d268..61ffefe 100644 --- a/tests/testinterop.nim +++ b/tests/testinterop.nim @@ -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()