Skip to content

Commit

Permalink
test: fix flaky anvil test (alloy-rs#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored and ben186 committed Jul 27, 2024
1 parent 42afcbd commit 16aa15d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/provider/src/ext/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ mod tests {

let start_num = provider.get_block_number().await.unwrap();

tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
tokio::time::sleep(tokio::time::Duration::from_millis(1500)).await;

let num = provider.get_block_number().await.unwrap();

assert_eq!(num, start_num + 2);
assert_eq!(num, start_num + 1);
}

#[tokio::test]
Expand Down

0 comments on commit 16aa15d

Please sign in to comment.