From 1db8540fe62bb76f14a8d54dc6838d3672b0130d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 8 May 2023 10:05:22 +0200 Subject: [PATCH] increase timing slack for sync tests --- src/tools/miri/tests/pass/concurrency/sync.rs | 10 ++++++---- 1 file 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 3bd1e5424070..a4d523204bc5 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(); }