From 71063088fb41f95a5469c738d4f4b608a6784587 Mon Sep 17 00:00:00 2001 From: Fabio Barone Date: Mon, 25 Feb 2019 10:59:57 -0500 Subject: [PATCH] swarm/network/simulation: fixed wrong sim.Close() --- swarm/network/simulation/kademlia_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/network/simulation/kademlia_test.go b/swarm/network/simulation/kademlia_test.go index b3fcb7698f..7125e37c84 100644 --- a/swarm/network/simulation/kademlia_test.go +++ b/swarm/network/simulation/kademlia_test.go @@ -50,7 +50,6 @@ func TestWaitTillHealthy(t *testing.T) { // create the first simulation sim := New(simServiceMap) - defer sim.Close() // connect and... _, err := sim.AddNodesAndConnectRing(testNodesNum) @@ -79,6 +78,7 @@ func TestWaitTillHealthy(t *testing.T) { t.Fatal(err) } + sim.Close() // create a control simulation controlSim := New(createSimServiceMap(false)) defer controlSim.Close() @@ -111,7 +111,7 @@ func TestWaitTillHealthy(t *testing.T) { for _, node := range nodeIDs { // ...get its kademlia - item, ok := sim.NodeItem(node, BucketKeyKademlia) + item, ok := controlSim.NodeItem(node, BucketKeyKademlia) if !ok { t.Fatal("No kademlia bucket item") }