From cb9884708b67f51644f5fc20061f97c3d7c29d45 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Mon, 17 Mar 2025 10:59:50 +0800 Subject: [PATCH] eth/catalyst: fix flaky test --- eth/catalyst/simulated_beacon_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth/catalyst/simulated_beacon_test.go b/eth/catalyst/simulated_beacon_test.go index ea35482896..3a74a92ed5 100644 --- a/eth/catalyst/simulated_beacon_test.go +++ b/eth/catalyst/simulated_beacon_test.go @@ -120,7 +120,7 @@ func TestSimulatedBeaconSendWithdrawals(t *testing.T) { includedTxs := make(map[common.Hash]struct{}) var includedWithdrawals []uint64 - timer := time.NewTimer(12 * time.Second) + timer := time.NewTimer(30 * time.Second) for { select { case ev := <-chainHeadCh: @@ -131,8 +131,8 @@ func TestSimulatedBeaconSendWithdrawals(t *testing.T) { for _, includedWithdrawal := range block.Withdrawals() { includedWithdrawals = append(includedWithdrawals, includedWithdrawal.Index) } - // ensure all withdrawals/txs included. this will take two blocks b/c number of withdrawals > 10 - if len(includedTxs) == len(txs) && len(includedWithdrawals) == len(withdrawals) && ev.Header.Number.Cmp(big.NewInt(2)) == 0 { + // ensure all withdrawals/txs included. this will at least take two blocks b/c number of withdrawals > 10 + if len(includedTxs) == len(txs) && len(includedWithdrawals) == len(withdrawals) { return } case <-timer.C: