Skip to content

Commit

Permalink
p2p: fix bug in TestPeerDisconnect (#20277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick authored and fjl committed Nov 13, 2019
1 parent de2259d commit 6f1a600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func TestPeerDisconnect(t *testing.T) {
// This test is supposed to verify that Peer can reliably handle
// multiple causes of disconnection occurring at the same time.
func TestPeerDisconnectRace(t *testing.T) {
maybe := func() bool { return rand.Intn(1) == 1 }
maybe := func() bool { return rand.Intn(2) == 1 }

for i := 0; i < 1000; i++ {
protoclose := make(chan error)
Expand Down

0 comments on commit 6f1a600

Please sign in to comment.