good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
96c7c18b
Commit
96c7c18b
authored
Jan 16, 2019
by
Janoš Guljaš
Committed by
Viktor Trón
Jan 16, 2019
Browse files
Options
Downloads
Patches
Plain Diff
swarm/network: fix data race in TestNetworkID test (#18460)
parent
d37f9876
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
swarm/network/networkid_test.go
+4
-5
4 additions, 5 deletions
swarm/network/networkid_test.go
with
4 additions
and
5 deletions
swarm/network/networkid_test.go
+
4
−
5
View file @
96c7c18b
...
@@ -76,13 +76,12 @@ func TestNetworkID(t *testing.T) {
...
@@ -76,13 +76,12 @@ func TestNetworkID(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Error setting up network: %v"
,
err
)
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
//let's sleep to ensure all nodes are connected
time
.
Sleep
(
1
*
time
.
Second
)
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 each group sharing the same network ID...
for
_
,
netIDGroup
:=
range
nodeMap
{
for
_
,
netIDGroup
:=
range
nodeMap
{
log
.
Trace
(
"netIDGroup size"
,
"size"
,
len
(
netIDGroup
))
log
.
Trace
(
"netIDGroup size"
,
"size"
,
len
(
netIDGroup
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment