Skip to content

Commit f33d7f4

Browse files
committed
fix test
1 parent e3bf89f commit f33d7f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: tests/io_timeout.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ use async_std::task;
77
#[should_panic(expected = "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_millis(100), async {
11+
task::sleep(Duration::from_secs(1)).await;
12+
1413
Ok(())
1514
})
1615
.await

0 commit comments

Comments
 (0)