eth: increase timeout in TestBroadcastBlock (#21299)

pull/21316/head
Martin Holst Swende 4 years ago committed by GitHub
parent c16967c267
commit 5b1cfdef89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      eth/handler_test.go

@ -614,13 +614,16 @@ func testBroadcastBlock(t *testing.T, totalPeers, broadcastExpected int) {
select {
case <-doneCh:
received++
case <-time.After(time.Second):
if received > broadcastExpected {
// We can bail early here
t.Errorf("broadcast count mismatch: have %d > want %d", received, broadcastExpected)
return
}
case <-time.After(2 * time.Second):
if received != broadcastExpected {
t.Errorf("broadcast count mismatch: have %d, want %d", received, broadcastExpected)
}
return
case err = <-errCh:
t.Fatalf("broadcast failed: %v", err)
}

Loading…
Cancel
Save