diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-06-18 20:22:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 20:22:51 -0400 |
| commit | 965d260094171791177b22a0218082b03a5823a5 (patch) | |
| tree | b0eea7d96dccff9b40013f9bc1262dec33157859 | |
| parent | b5b4fbe7a6e95daa5a700bf666cdab0d2f55a4d3 (diff) | |
| parent | 66e056a3a7f16a61865ce5feb581d267e400016b (diff) | |
| download | rust-965d260094171791177b22a0218082b03a5823a5.tar.gz rust-965d260094171791177b22a0218082b03a5823a5.zip | |
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.
| -rw-r--r-- | library/std/tests/sync/mpmc.rs | 4 |
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(); } |
