mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network/simulation: fixed wrong sim.Close()
This commit is contained in:
parent
6ba8a5b65c
commit
71063088fb
1 changed files with 2 additions and 2 deletions
|
|
@ -50,7 +50,6 @@ func TestWaitTillHealthy(t *testing.T) {
|
||||||
|
|
||||||
// create the first simulation
|
// create the first simulation
|
||||||
sim := New(simServiceMap)
|
sim := New(simServiceMap)
|
||||||
defer sim.Close()
|
|
||||||
|
|
||||||
// connect and...
|
// connect and...
|
||||||
_, err := sim.AddNodesAndConnectRing(testNodesNum)
|
_, err := sim.AddNodesAndConnectRing(testNodesNum)
|
||||||
|
|
@ -79,6 +78,7 @@ func TestWaitTillHealthy(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sim.Close()
|
||||||
// create a control simulation
|
// create a control simulation
|
||||||
controlSim := New(createSimServiceMap(false))
|
controlSim := New(createSimServiceMap(false))
|
||||||
defer controlSim.Close()
|
defer controlSim.Close()
|
||||||
|
|
@ -111,7 +111,7 @@ func TestWaitTillHealthy(t *testing.T) {
|
||||||
|
|
||||||
for _, node := range nodeIDs {
|
for _, node := range nodeIDs {
|
||||||
// ...get its kademlia
|
// ...get its kademlia
|
||||||
item, ok := sim.NodeItem(node, BucketKeyKademlia)
|
item, ok := controlSim.NodeItem(node, BucketKeyKademlia)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("No kademlia bucket item")
|
t.Fatal("No kademlia bucket item")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue