aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorJanoš Guljaš <janos@users.noreply.github.com>2019-01-16 19:56:34 +0800
committerRafael Matias <rafael@skyle.net>2019-02-19 19:54:10 +0800
commite63995b3f36837b97330a7ccaf56277099904d26 (patch)
tree814a1c0b52d5b19cb141644b803d9a0fa0429641 /swarm
parentdd3e89474777b39b7bea646796de594449ea2304 (diff)
downloaddexon-e63995b3f36837b97330a7ccaf56277099904d26.tar.gz
dexon-e63995b3f36837b97330a7ccaf56277099904d26.tar.zst
dexon-e63995b3f36837b97330a7ccaf56277099904d26.zip
swarm/network: fix data race in TestNetworkID test (#18460)
(cherry picked from commit 96c7c18b184ae894f1c6bd5fbfc45fbcfa9ace77)
Diffstat (limited to 'swarm')
-rw-r--r--swarm/network/networkid_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/swarm/network/networkid_test.go b/swarm/network/networkid_test.go
index 99890118f..8e68e5b52 100644
--- a/swarm/network/networkid_test.go
+++ b/swarm/network/networkid_test.go
@@ -76,13 +76,12 @@ func TestNetworkID(t *testing.T) {
if err != nil {
t.Fatalf("Error setting up network: %v", err)
}
- defer func() {
- //shutdown the snapshot network
- log.Trace("Shutting down network")
- net.Shutdown()
- }()
//let's sleep to ensure all nodes are connected
time.Sleep(1 * time.Second)
+ // shutdown the the network to avoid race conditions
+ // on accessing kademlias global map while network nodes
+ // are accepting messages
+ net.Shutdown()
//for each group sharing the same network ID...
for _, netIDGroup := range nodeMap {
log.Trace("netIDGroup size", "size", len(netIDGroup))
;id=b249821687f755f7faef70569ec30810dac17816'>Convert to wxPython30 and modernize pythonbapt2014-08-291-5/+5 * devel/libunistring:tijl2014-08-291-1/+1 * Upgrade to 0.14, remove BROKEN, fix pkg-plist.vanilla2014-08-283-7/+8 * net-p2p/btsync: update 1.3.106 -> 1.3.109robak2014-08-272-5/+5 * - Fix missing library problems when the linker enforces explicit linkingtijl2014-08-267-46/+31 * Add net-p2p/zetacoin-nox11 as a slave to zetacoin. This allows installingadamw2014-08-242-0/+12 * net-p2p/uhub: update to 0.5.0wg2014-08-244-3/+19 * net-p2p/eiskaltdcpp-cliadamw2014-08-2446-1819/+1430 * net-p2p/gtk-gnutella: Finish off de-hardcoding pkg-plistmarino2014-08-231-1/+1 * Berkeley DB cleanup, remove versions 4.0 ... 4.7.mandree2014-08-229-7/+10 * - Add missing -lcrypto (fixup for r364712)tijl2014-08-211-3/+4 * - Move RESETPREFIX to default PLIST_SUBbdrewery2014-08-192-2/+0 * Fix build on -current.adamw2014-08-172-1/+12 * - Remove leading indefinite article from COMMENTsunpoet2014-08-171-2/+1 * Remove a very strange series of ^H's from the pkg-message, and remove theadamw2014-08-172-4/+1 * Upgrade OpenEXR and ilmbase to 2.2.0.mandree2014-08-162-2/+2 * Refresh.thierry2014-08-152-4/+4 * - Update from 0.8.2 to 0.8.3danilo2014-08-152-10/+9 * Prevent installation. We don't have a distfile that matches the checksums, th...mandree2014-08-141-0/+5 * Fix problems with missing libs when the linker enforces explicit linkingtijl2014-08-121-11/+6 * net-p2p/zetacoin: update to 0.9.2.1wg2014-08-1210-143/+121 * Bump PORTREVISION on all ports that depend on net/GeoIP foradamw2014-08-1216-13/+16 * net-p2p/gtk-gnutella: Upgrade version 1.0.1 => 1.1.0marino2014-08-103-49/+31 * net-p2p/bitmessage: update to 0.4.3wg2014-08-093-16/+20 * In some straightforward situations, protect examples behind PORTEXAMPLES,adamw2014-08-062-6/+6 * net-p2p/transmission-gtk: complete the -inotify fix with LIB_DEPENDS+=marino2014-08-041-1/+2 * In some straightforward cases, protect documentation behindadamw2014-08-04