From f6c4d2130aaf7e2117a514122b1affa0bc3e6e77 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 12 Feb 2020 18:17:20 -0500 Subject: [PATCH] don't forget to await for switch to close --- tests/pubsub/testfloodsub.nim | 2 +- tests/testswitch.nim | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/pubsub/testfloodsub.nim b/tests/pubsub/testfloodsub.nim index e7e2f31..d60b30b 100644 --- a/tests/pubsub/testfloodsub.nim +++ b/tests/pubsub/testfloodsub.nim @@ -7,7 +7,7 @@ ## This file may not be copied, modified, or distributed except according to ## those terms. -import unittest, sequtils, options +import unittest, sequtils import chronos import utils, ../../libp2p/[switch, diff --git a/tests/testswitch.nim b/tests/testswitch.nim index fcbf248..ce689ef 100644 --- a/tests/testswitch.nim +++ b/tests/testswitch.nim @@ -101,6 +101,7 @@ suite "Switch": check isNil(conn) discard allFutures(switch1.stop(), switch2.stop()) + await allFutures(awaiters) result = true check: