wasi-tokio: increase timeout in poll_oneoff test here as well
This commit is contained in:
@@ -8,6 +8,8 @@ use wasi_common::{
|
|||||||
};
|
};
|
||||||
use wasi_tokio::{clocks_ctx, sched::poll_oneoff, Dir};
|
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")]
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
async fn empty_file_readable() -> Result<(), Error> {
|
async fn empty_file_readable() -> Result<(), Error> {
|
||||||
let clocks = clocks_ctx();
|
let clocks = clocks_ctx();
|
||||||
@@ -40,7 +42,7 @@ async fn empty_file_readable() -> Result<(), Error> {
|
|||||||
clocks
|
clocks
|
||||||
.monotonic
|
.monotonic
|
||||||
.now(clocks.monotonic.resolution())
|
.now(clocks.monotonic.resolution())
|
||||||
.checked_add(Duration::from_millis(10))
|
.checked_add(TIMEOUT)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
clocks.monotonic.resolution(),
|
clocks.monotonic.resolution(),
|
||||||
Userdata::from(0),
|
Userdata::from(0),
|
||||||
@@ -82,7 +84,7 @@ async fn empty_file_writable() -> Result<(), Error> {
|
|||||||
clocks
|
clocks
|
||||||
.monotonic
|
.monotonic
|
||||||
.now(clocks.monotonic.resolution())
|
.now(clocks.monotonic.resolution())
|
||||||
.checked_add(Duration::from_millis(10))
|
.checked_add(TIMEOUT)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
clocks.monotonic.resolution(),
|
clocks.monotonic.resolution(),
|
||||||
Userdata::from(0),
|
Userdata::from(0),
|
||||||
@@ -109,7 +111,7 @@ async fn stdio_readable() -> Result<(), Error> {
|
|||||||
let deadline = clocks
|
let deadline = clocks
|
||||||
.monotonic
|
.monotonic
|
||||||
.now(clocks.monotonic.resolution())
|
.now(clocks.monotonic.resolution())
|
||||||
.checked_add(Duration::from_millis(10))
|
.checked_add(TIMEOUT)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut waiting_on: HashMap<u64, Box<dyn WasiFile>> = vec![
|
let mut waiting_on: HashMap<u64, Box<dyn WasiFile>> = vec![
|
||||||
|
|||||||
Reference in New Issue
Block a user