Skip to content

Commit 7fa9826

Browse files
committed
fix test
1 parent e3bf89f commit 7fa9826

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/io_timeout.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ use async_std::io;
44
use async_std::task;
55

66
#[test]
7-
#[should_panic(expected = "timed out")]
7+
#[should_panic(expected = "future timed out")]
88
fn io_timeout_timedout() {
99
task::block_on(async {
10-
io::timeout(Duration::from_secs(1), async {
11-
let stdin = std::io::stdin();
12-
let mut line = String::new();
13-
let _n = stdin.read_line(&mut line)?;
10+
io::timeout(Duration::from_micros(10), async {
11+
task::sleep(Duration::from_micros(100)).await;
12+
1413
Ok(())
1514
})
1615
.await

0 commit comments

Comments
 (0)