Skip to content

Commit dd80b1a

Browse files
committed
work harder around notorious macos unrealiability
1 parent bacf131 commit dd80b1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/pass/concurrency/sync.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ fn check_conditional_variables_timed_wait_notimeout() {
8181
cvar.notify_one();
8282
});
8383

84-
let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(1000)).unwrap();
84+
// macOS runners are very unreliable.
85+
let timeout = if cfg!(target_os = "macos") { 2000 } else { 500 };
86+
let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(timeout)).unwrap();
8587
assert!(!timeout.timed_out());
8688
handle.join().unwrap();
8789
}

0 commit comments

Comments
 (0)