Skip to content

Commit

Permalink
eth, les: fix flaky tests (#20897)
Browse files Browse the repository at this point in the history
* les: fix flaky test

* eth: fix flaky test
  • Loading branch information
rjl493456442 committed Apr 7, 2020
1 parent 3cf7d2e commit f0b5eb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eth/handler_test.go
Expand Up @@ -615,7 +615,7 @@ func testBroadcastBlock(t *testing.T, totalPeers, broadcastExpected int) {
case <-doneCh:
received++

case <-time.After(100 * time.Millisecond):
case <-time.After(time.Second):
if received != broadcastExpected {
t.Errorf("broadcast count mismatch: have %d, want %d", received, broadcastExpected)
}
Expand Down
2 changes: 1 addition & 1 deletion les/peer_test.go
Expand Up @@ -140,7 +140,7 @@ func TestHandshake(t *testing.T) {
if err != nil {
t.Fatalf("handshake failed, %v", err)
}
case <-time.NewTimer(100 * time.Millisecond).C:
case <-time.After(time.Second):
t.Fatalf("timeout")
}
}
Expand Down

0 comments on commit f0b5eb0

Please sign in to comment.