aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/testing
diff options
context:
space:
mode:
authorJanoš Guljaš <janos@users.noreply.github.com>2019-04-26 03:33:18 +0800
committerViktor Trón <viktor.tron@gmail.com>2019-04-26 03:33:18 +0800
commit3873a7314d6c82f3128a627e55b38a7437a30f9f (patch)
tree1a46145649794fdc73f6963a69023b1dab4c3df0 /p2p/testing
parent92a849a5095a3d53b8c7d52be32c583ef2acdc6d (diff)
downloadgo-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar.gz
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar.bz2
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar.lz
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar.xz
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.tar.zst
go-tangerine-3873a7314d6c82f3128a627e55b38a7437a30f9f.zip
swarm/network: fix data races in TestInitialPeersMsg test (#19490)
* swarm/network: fix data races in TestInitialPeersMsg test * swarm/network: add Kademlia.Saturation method with lock * swarm/network: add Hive.Peer method to safely retrieve a bzz peer * swarm/network: remove duplicate comment * p2p/testing: prevent goroutine leak in ProtocolTester * swarm/network: fix data race in newBzzBaseTesterWithAddrs * swarm/network: fix goroutone leaks in testInitialPeersMsg * swarm/network: raise number of peer check attempts in testInitialPeersMsg * swarm/network: use Hive.Peer in Hive.PeerInfo function * swarm/network: reduce the scope of mutex lock in newBzzBaseTesterWithAddrs * swarm/storage: disable TestCleanIndex with race detector
Diffstat (limited to 'p2p/testing')
-rw-r--r--p2p/testing/protocoltester.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/p2p/testing/protocoltester.go b/p2p/testing/protocoltester.go
index 1e1752af8..e798240a5 100644
--- a/p2p/testing/protocoltester.go
+++ b/p2p/testing/protocoltester.go
@@ -110,6 +110,7 @@ func NewProtocolTester(prvkey *ecdsa.PrivateKey, nodeCount int, run func(*p2p.Pe
// Stop stops the p2p server
func (t *ProtocolTester) Stop() {
t.Server.Stop()
+ t.network.Shutdown()
}
// Connect brings up the remote peer node and connects it using the