From f7740bc8c79e61afcfdb146f656f4fbb965f98ec Mon Sep 17 00:00:00 2001 From: hzq12177 Date: Sun, 23 Feb 2025 17:14:54 +0800 Subject: [PATCH] fix: improve TestSimulatedBeaconSendWithdrawals reliability (fixes #31169) - Increased test timeout from 12s to 30s to ensure completion. --- eth/catalyst/simulated_beacon_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eth/catalyst/simulated_beacon_test.go b/eth/catalyst/simulated_beacon_test.go index e8696a604c..79d9ba738e 100644 --- a/eth/catalyst/simulated_beacon_test.go +++ b/eth/catalyst/simulated_beacon_test.go @@ -86,8 +86,7 @@ func TestSimulatedBeaconSendWithdrawals(t *testing.T) { // short period (1 second) for testing purposes var gasLimit uint64 = 10_000_000 genesis := core.DeveloperGenesisBlock(gasLimit, &testAddr) - // Increase block generation frequency by reducing the period to 0.5 seconds - node, ethService, mock := startSimulatedBeaconEthService(t, genesis, 0.5) + node, ethService, mock := startSimulatedBeaconEthService(t, genesis, 1) _ = mock defer node.Close() @@ -120,8 +119,7 @@ func TestSimulatedBeaconSendWithdrawals(t *testing.T) { includedTxs := make(map[common.Hash]struct{}) var includedWithdrawals []uint64 - // Increase timeout to 30 seconds to ensure the test has enough time to complete - timer := time.NewTimer(30 * time.Second) + timer := time.NewTimer(12 * time.Second) for { select { case ev := <-chainHeadCh: