Skip to content

Commit 965d260

Browse files
authored
Rollup merge of #142654 - workingjubilee:increase-timeout-factor-on-mpmc-test, r=joshtriplett
library: Increase timeout on mpmc test to reduce flakes This recently spuriously failed in a rollup, so I think we can afford to increase the base timeout and the amount of time slept for to provide a much wider margin for the timeout to be reached.
2 parents b5b4fbe + 66e056a commit 965d260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/tests/sync/mpmc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ fn oneshot_single_thread_recv_timeout() {
463463
fn stress_recv_timeout_two_threads() {
464464
let (tx, rx) = channel();
465465
let stress = stress_factor() + 50;
466-
let timeout = Duration::from_millis(5);
466+
let timeout = Duration::from_millis(10);
467467

468468
thread::spawn(move || {
469469
for i in 0..stress {
470470
if i % 2 == 0 {
471-
thread::sleep(timeout * 2);
471+
thread::sleep(timeout * 4);
472472
}
473473
tx.send(1usize).unwrap();
474474
}

0 commit comments

Comments
 (0)