Skip to content

Commit

Permalink
time: fix repeatedly_reset_entry_inserted_as_expired test (#5570)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn committed Mar 21, 2023
1 parent b489acb commit 2dfe4e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tokio-util/tests/time_delay_queue.rs
Expand Up @@ -257,6 +257,10 @@ async fn reset_twice() {
#[tokio::test]
async fn repeatedly_reset_entry_inserted_as_expired() {
time::pause();

// Instants before the start of the test seem to break in wasm.
time::sleep(ms(1000)).await;

let mut queue = task::spawn(DelayQueue::new());
let now = Instant::now();

Expand Down Expand Up @@ -556,6 +560,10 @@ async fn reset_later_after_slot_starts() {
#[tokio::test]
async fn reset_inserted_expired() {
time::pause();

// Instants before the start of the test seem to break in wasm.
time::sleep(ms(1000)).await;

let mut queue = task::spawn(DelayQueue::new());
let now = Instant::now();

Expand Down

0 comments on commit 2dfe4e8

Please sign in to comment.