Skip to content

Commit

Permalink
UT: random failure of TestSnapSyncWithBlobs
Browse files Browse the repository at this point in the history
this case failed randomly in github CI, the ratio of around 20%
but can not be reproduced locally
  go test -p 1 -v -run TestSnapSyncWithBlobs -count 100

there could be a potential risk between `runEthPeer` and `runSnapExtension`, as
they shared the handler.peers.
Add extra wait time for `runEthPeer`
  • Loading branch information
zzzckck committed Jun 19, 2024
1 parent be0fbfb commit 72c5a9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eth/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ func testChainSyncWithBlobs(t *testing.T, mode downloader.SyncMode, preCancunBlk
go full.handler.runEthPeer(fullPeerEth, func(peer *eth.Peer) error {
return eth.Handle((*ethHandler)(full.handler), peer)
})
// Wait a bit for the above handlers to start
time.Sleep(250 * time.Millisecond)

emptyPipeSnap, fullPipeSnap := p2p.MsgPipe()
defer emptyPipeSnap.Close()
Expand Down

0 comments on commit 72c5a9f

Please sign in to comment.