From 5cda6a6f9e4b57005f57e08e7bb3362a50988d36 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Thu, 29 May 2025 10:37:04 +0900 Subject: [PATCH] Mitigate flakiness in test_delayed_rpc_response (#7522) https://github.com/sigp/lighthouse/issues/7466 Expanded the margin from 100ms to 500ms. --- beacon_node/lighthouse_network/tests/rpc_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon_node/lighthouse_network/tests/rpc_tests.rs b/beacon_node/lighthouse_network/tests/rpc_tests.rs index 72d7aa0074..5e54b595f2 100644 --- a/beacon_node/lighthouse_network/tests/rpc_tests.rs +++ b/beacon_node/lighthouse_network/tests/rpc_tests.rs @@ -1246,10 +1246,12 @@ fn test_delayed_rpc_response() { // The second and subsequent responses are delayed due to the response rate-limiter on the receiver side. // Adding a slight margin to the elapsed time check to account for potential timing issues caused by system // scheduling or execution delays during testing. + // https://github.com/sigp/lighthouse/issues/7466 + let margin = 500; assert!( request_sent_at.elapsed() > (Duration::from_secs(QUOTA_SEC) - - Duration::from_millis(100)) + - Duration::from_millis(margin)) ); if request_id == 5 { // End the test