Skip to content

Commit 2097765

Browse files
authored
test: fix flaky test (#8839)
1 parent 0079a11 commit 2097765

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/anvil/tests/it/traces.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -766,15 +766,15 @@ async fn test_trace_filter() {
766766
for i in 0..=5 {
767767
let tx = TransactionRequest::default().to(to).value(U256::from(i)).from(from);
768768
let tx = WithOtherFields::new(tx);
769-
api.send_transaction(tx).await.unwrap();
769+
provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap();
770770

771771
let tx = TransactionRequest::default().to(to_two).value(U256::from(i)).from(from_two);
772772
let tx = WithOtherFields::new(tx);
773-
api.send_transaction(tx).await.unwrap();
773+
provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap();
774774
}
775775

776776
let traces = api.trace_filter(tracer).await.unwrap();
777-
assert_eq!(traces.len(), 5);
777+
assert_eq!(traces.len(), 6);
778778

779779
// Test for the following actions:
780780
// Create (deploy the contract)
@@ -804,11 +804,11 @@ async fn test_trace_filter() {
804804
for i in 0..=5 {
805805
let tx = TransactionRequest::default().to(to_two).value(U256::from(i)).from(from_two);
806806
let tx = WithOtherFields::new(tx);
807-
api.send_transaction(tx).await.unwrap();
807+
provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap();
808808
}
809809

810810
let traces = api.trace_filter(tracer).await.unwrap();
811-
assert_eq!(traces.len(), 8);
811+
assert_eq!(traces.len(), 9);
812812

813813
// Test Range Error
814814
let latest = provider.get_block_number().await.unwrap();
@@ -854,7 +854,7 @@ async fn test_trace_filter() {
854854
for i in 0..=10 {
855855
let tx = TransactionRequest::default().to(to).value(U256::from(i)).from(from);
856856
let tx = WithOtherFields::new(tx);
857-
api.send_transaction(tx).await.unwrap();
857+
provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap();
858858
}
859859

860860
let traces = api.trace_filter(tracer).await.unwrap();

0 commit comments

Comments
 (0)