rust/library/std/tests/sync
Josh Triplett 889f7cbffa Avoid a gratuitous 10s wait in a stress test
`stress_recv_timeout_two_threads`, in the mpmc and mpsc testsuites,
is a stress test of the `recv_timeout` function. This test processes and
ignores timeouts, and just ensures that every sent value gets received.
As such, the exact length of the timeouts is not critical, only that
the timeout and sleep durations ensure that at least one timeout
occurred.

The current tests have 100 iterations, half of which sleep for 200ms,
causing the test to take 10s. This represents around 2/3rds of the
*total* runtime of the `library/std` testsuite.

Reduce this to 50 iterations where half of them sleep for 10ms, causing
the test to take 0.25s.

Add a check that at least one timeout occurred.
2025-06-08 20:22:07 -07:00
..
barrier.rs Move std::sync unit tests to integration tests 2025-01-26 10:28:05 +00:00
condvar.rs Move std::sync unit tests to integration tests 2025-01-26 10:28:05 +00:00
lazy_lock.rs Move std::sync unit tests to integration tests 2025-01-26 10:28:05 +00:00
lib.rs Remove stabilized feature gate 2025-02-02 18:28:08 +00:00
mpmc.rs Avoid a gratuitous 10s wait in a stress test 2025-06-08 20:22:07 -07:00
mpsc.rs Avoid a gratuitous 10s wait in a stress test 2025-06-08 20:22:07 -07:00
mpsc_sync.rs Move std::sync unit tests to integration tests 2025-01-26 10:28:05 +00:00
mutex.rs Rename (Mapped)(RwLock|Mutex)Guard::try_map to filter_map. 2025-04-30 19:43:24 -05:00
once.rs Mark some std tests as requiring panic = "unwind" 2025-03-10 08:31:06 -07:00
once_lock.rs Mark some std tests as requiring panic = "unwind" 2025-03-10 08:31:06 -07:00
reentrant_lock.rs Move std::sync unit tests to integration tests 2025-01-26 10:28:05 +00:00
rwlock.rs Rename (Mapped)(RwLock|Mutex)Guard::try_map to filter_map. 2025-04-30 19:43:24 -05:00