Skip to content

Commit

Permalink
updates affected vectors test
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Sep 30, 2024
1 parent 5d2fa07 commit b3b88b4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions zebrad/src/components/mempool/tests/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,22 +978,20 @@ async fn mempool_responds_to_await_output() -> Result<(), Report> {
let result_rx = results.remove(0).expect("should pass initial checks");
assert!(results.is_empty(), "should have 1 result for 1 queued tx");

tokio::time::timeout(Duration::from_secs(10), result_rx)
.await
.expect("should not time out")
.expect("mempool tx verification result channel should not be closed")
.expect("mocked verification should be successful");

// Wait for next steps in mempool's Downloads to finish
// TODO: Move this and the `ready().await` below above waiting for the mempool verification result above after
// waiting to respond with a transaction's verification result until after it's been inserted into the mempool.
// Wait for post-verification steps in mempool's Downloads
tokio::time::sleep(Duration::from_secs(1)).await;

mempool
.ready()
.await
.expect("polling mempool should succeed");

tokio::time::timeout(Duration::from_secs(10), result_rx)
.await
.expect("should not time out")
.expect("mempool tx verification result channel should not be closed")
.expect("mocked verification should be successful");

assert_eq!(
mempool.storage().transaction_count(),
1,
Expand Down

0 comments on commit b3b88b4

Please sign in to comment.