about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-06-17 16:10:35 -0700
committerJubilee Young <workingjubilee@gmail.com>2025-06-17 16:10:37 -0700
commit66e056a3a7f16a61865ce5feb581d267e400016b (patch)
treebbb325c62002cf132487946a6cad3659b57a3f13
parentf3db63916e541ff039ac3cd7364c2d612749b61b (diff)
downloadrust-66e056a3a7f16a61865ce5feb581d267e400016b.tar.gz
rust-66e056a3a7f16a61865ce5feb581d267e400016b.zip
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.
-rw-r--r--library/std/tests/sync/mpmc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/tests/sync/mpmc.rs b/library/std/tests/sync/mpmc.rs
index 594fc2180d8..bf80ab96a88 100644
--- a/library/std/tests/sync/mpmc.rs
+++ b/library/std/tests/sync/mpmc.rs
@@ -463,12 +463,12 @@ fn oneshot_single_thread_recv_timeout() {
 fn stress_recv_timeout_two_threads() {
     let (tx, rx) = channel();
     let stress = stress_factor() + 50;
-    let timeout = Duration::from_millis(5);
+    let timeout = Duration::from_millis(10);
 
     thread::spawn(move || {
         for i in 0..stress {
             if i % 2 == 0 {
-                thread::sleep(timeout * 2);
+                thread::sleep(timeout * 4);
             }
             tx.send(1usize).unwrap();
         }