mirror of
https://github.com/async-rs/async-std.git
synced 2025-06-21 05:31:33 +00:00
fix test
This commit is contained in:
parent
e3bf89fc05
commit
f33d7f40ab
1 changed files with 3 additions and 4 deletions
|
@ -7,10 +7,9 @@ use async_std::task;
|
||||||
#[should_panic(expected = "timed out")]
|
#[should_panic(expected = "timed out")]
|
||||||
fn io_timeout_timedout() {
|
fn io_timeout_timedout() {
|
||||||
task::block_on(async {
|
task::block_on(async {
|
||||||
io::timeout(Duration::from_secs(1), async {
|
io::timeout(Duration::from_millis(100), async {
|
||||||
let stdin = std::io::stdin();
|
task::sleep(Duration::from_secs(1)).await;
|
||||||
let mut line = String::new();
|
|
||||||
let _n = stdin.read_line(&mut line)?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in a new issue