Skip to content

Commit 955249c

Browse files
authored
Increase the durations in test_service_as_oracle_timeout_early_stop. (#3767)
## Motivation `cargo test -p linera-chain` fails for me locally most of the time. (Note that it only fails if I run _all_ the `linera-chain` tests. If it's _only_ `test_service_as_oracle_timeout_early_stop`, it passes.) ## Proposal Multiply the durations in the test by 10, to make them less flaky. ## Test Plan With this change, `cargo test -p linera-chain` works for me, even in debug mode. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links - Closes #3766. - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 29f5a83 commit 955249c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

linera-chain/src/unit_tests/chain_tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,17 +400,17 @@ async fn test_service_as_oracle_exceeding_time_limit(
400400
}
401401

402402
/// Tests if execution fails early if services call `check_execution_time`.
403-
#[test_case(&[120]; "single service as oracle call")]
404-
#[test_case(&[60, 60]; "two service as oracle calls")]
405-
#[test_case(&[105, 15]; "long and short service as oracle calls")]
406-
#[test_case(&[50, 50, 50]; "three service as oracle calls")]
407-
#[test_case(&[60, 60, 60]; "first two service as oracle calls exceeds limit")]
403+
#[test_case(&[1200]; "single service as oracle call")]
404+
#[test_case(&[600, 600]; "two service as oracle calls")]
405+
#[test_case(&[1050, 150]; "long and short service as oracle calls")]
406+
#[test_case(&[500, 500, 500]; "three service as oracle calls")]
407+
#[test_case(&[600, 600, 600]; "first two service as oracle calls exceeds limit")]
408408
#[tokio::test]
409409
async fn test_service_as_oracle_timeout_early_stop(
410410
service_oracle_execution_times_ms: &[u64],
411411
) -> anyhow::Result<()> {
412-
let maximum_service_oracle_execution_ms = 70;
413-
let poll_interval = Duration::from_millis(10);
412+
let maximum_service_oracle_execution_ms = 700;
413+
let poll_interval = Duration::from_millis(100);
414414
let maximum_expected_execution_time =
415415
Duration::from_millis(maximum_service_oracle_execution_ms) + 2 * poll_interval;
416416

0 commit comments

Comments
 (0)