diff options
| author | Ralf Jung <post@ralfj.de> | 2023-05-08 10:05:22 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-05-08 10:05:27 +0200 |
| commit | 1db8540fe62bb76f14a8d54dc6838d3672b0130d (patch) | |
| tree | b70193d40bb1e516499cb6a27ca2dc60519fde16 | |
| parent | 3d5a5167101f0f828a2c7a084a3a7631ad1a44ed (diff) | |
increase timing slack for sync tests
| -rw-r--r-- | src/tools/miri/tests/pass/concurrency/sync.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/miri/tests/pass/concurrency/sync.rs b/src/tools/miri/tests/pass/concurrency/sync.rs index 3bd1e542407..a4d523204bc 100644 --- a/src/tools/miri/tests/pass/concurrency/sync.rs +++ b/src/tools/miri/tests/pass/concurrency/sync.rs @@ -201,8 +201,9 @@ fn park_timeout() { thread::park_timeout(Duration::from_millis(200)); // Normally, waiting in park/park_timeout may spuriously wake up early, but we // know Miri's timed synchronization primitives do not do that. - - assert!((200..1000).contains(&start.elapsed().as_millis())); + // We allow much longer sleeps as well since the macOS GHA runners seem very oversubscribed + // and sometimes just pause for 1 second or more. + assert!((200..2000).contains(&start.elapsed().as_millis())); } fn park_unpark() { @@ -219,8 +220,9 @@ fn park_unpark() { thread::park(); // Normally, waiting in park/park_timeout may spuriously wake up early, but we // know Miri's timed synchronization primitives do not do that. - - assert!((200..1000).contains(&start.elapsed().as_millis())); + // We allow much longer sleeps as well since the macOS GHA runners seem very oversubscribed + // and sometimes just pause for 1 second or more. + assert!((200..2000).contains(&start.elapsed().as_millis())); t2.join().unwrap(); } |
