From e66909f710be9cd1dfb1a28088cdd6d3e601e38f Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 11 May 2021 09:24:15 -0700 Subject: [PATCH] wasi-tokio: increase timeout in poll_oneoff test here as well --- crates/wasi-common/tokio/tests/poll_oneoff.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/wasi-common/tokio/tests/poll_oneoff.rs b/crates/wasi-common/tokio/tests/poll_oneoff.rs index fa04f4604e..32c91c335a 100644 --- a/crates/wasi-common/tokio/tests/poll_oneoff.rs +++ b/crates/wasi-common/tokio/tests/poll_oneoff.rs @@ -8,6 +8,8 @@ use wasi_common::{ }; use wasi_tokio::{clocks_ctx, sched::poll_oneoff, Dir}; +const TIMEOUT: Duration = Duration::from_millis(20); // Required for slow execution in CI + #[tokio::test(flavor = "multi_thread")] async fn empty_file_readable() -> Result<(), Error> { let clocks = clocks_ctx(); @@ -40,7 +42,7 @@ async fn empty_file_readable() -> Result<(), Error> { clocks .monotonic .now(clocks.monotonic.resolution()) - .checked_add(Duration::from_millis(10)) + .checked_add(TIMEOUT) .unwrap(), clocks.monotonic.resolution(), Userdata::from(0), @@ -82,7 +84,7 @@ async fn empty_file_writable() -> Result<(), Error> { clocks .monotonic .now(clocks.monotonic.resolution()) - .checked_add(Duration::from_millis(10)) + .checked_add(TIMEOUT) .unwrap(), clocks.monotonic.resolution(), Userdata::from(0), @@ -109,7 +111,7 @@ async fn stdio_readable() -> Result<(), Error> { let deadline = clocks .monotonic .now(clocks.monotonic.resolution()) - .checked_add(Duration::from_millis(10)) + .checked_add(TIMEOUT) .unwrap(); let mut waiting_on: HashMap> = vec![