mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-16 10:49:55 +00:00
increase timeouts
This commit is contained in:
parent
26f62aafd9
commit
1214bc2dee
1 changed files with 4 additions and 4 deletions
|
@ -23,13 +23,13 @@ fn wait_timeout_with_lock() {
|
||||||
spawn(async move {
|
spawn(async move {
|
||||||
let (m, c) = &*pair2;
|
let (m, c) = &*pair2;
|
||||||
let _g = m.lock().await;
|
let _g = m.lock().await;
|
||||||
task::sleep(Duration::from_millis(20)).await;
|
task::sleep(Duration::from_millis(200)).await;
|
||||||
c.notify_one();
|
c.notify_one();
|
||||||
});
|
});
|
||||||
|
|
||||||
let (m, c) = &*pair;
|
let (m, c) = &*pair;
|
||||||
let (_, wait_result) = c
|
let (_, wait_result) = c
|
||||||
.wait_timeout(m.lock().await, Duration::from_millis(10))
|
.wait_timeout(m.lock().await, Duration::from_millis(100))
|
||||||
.await;
|
.await;
|
||||||
assert!(wait_result.timed_out());
|
assert!(wait_result.timed_out());
|
||||||
})
|
})
|
||||||
|
@ -57,7 +57,7 @@ fn wait_timeout_until_timed_out() {
|
||||||
let c = Condvar::new();
|
let c = Condvar::new();
|
||||||
|
|
||||||
let (_, wait_result) = c
|
let (_, wait_result) = c
|
||||||
.wait_timeout_until(m.lock().await, Duration::from_millis(10), |&mut started| {
|
.wait_timeout_until(m.lock().await, Duration::from_millis(100), |&mut started| {
|
||||||
started
|
started
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
@ -85,7 +85,7 @@ fn notify_all() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give some time for tasks to start up
|
// Give some time for tasks to start up
|
||||||
task::sleep(Duration::from_millis(5)).await;
|
task::sleep(Duration::from_millis(50)).await;
|
||||||
|
|
||||||
let (m, c) = &*pair;
|
let (m, c) = &*pair;
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue