Mitigate flakiness in test_delayed_rpc_response (#7522)

https://github.com/sigp/lighthouse/issues/7466


  Expanded the margin from 100ms to 500ms.
This commit is contained in:
Akihito Nakano
2025-05-29 10:37:04 +09:00
committed by GitHub
parent 0ddf9a99d6
commit 5cda6a6f9e

View File

@@ -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