Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
remove deadlock in gateway testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVorick committed Jul 21, 2016
1 parent e6d0bec commit 1711a66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/gateway/peers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ func TestConnect(t *testing.T) {
t.Fatal(err)
}
// g should have the node
time.Sleep(100 * time.Millisecond)
time.Sleep(200 * time.Millisecond)
g.mu.RLock()
if _, ok := g.nodes[dummyNode]; !ok {
g.mu.RUnlock() // Needed to prevent a deadlock if this error condition is reached.
t.Fatal("bootstrapper should have received dummyNode:", g.nodes)
}
g.mu.RUnlock()
Expand Down

0 comments on commit 1711a66

Please sign in to comment.