diff --git a/ext/web/stream_resource.rs b/ext/web/stream_resource.rs index b96ac36bc5..54ebf775ac 100644 --- a/ext/web/stream_resource.rs +++ b/ext/web/stream_resource.rs @@ -650,7 +650,13 @@ mod tests { // Slightly slower reader let b = deno_core::unsync::spawn(async move { for _ in 0..BUFFER_CHANNEL_SIZE * 2 { - tokio::time::sleep(Duration::from_millis(1)).await; + if cfg!(windows) { + // windows has ~15ms resolution on sleep, so just yield so + // this test doesn't take 30 seconds to run + tokio::task::yield_now().await; + } else { + tokio::time::sleep(Duration::from_millis(1)).await; + } poll_fn(|cx| channel.poll_read_ready(cx)).await; channel.read(BUFFER_AGGREGATION_LIMIT).unwrap(); }