Skip to content

Commit

Permalink
Fix flaky event subscription test (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw authored Feb 15, 2022
1 parent 5c04b09 commit 117e2ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subxt/tests/integration/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ async fn non_finalized_block_subscription() -> Result<(), subxt::BasicError> {
// associated block hash is not finalized yet.
let events = event_sub.next().await.unwrap()?;
let event_block_hash = events.block_hash();
let finalized_hash = ctx.api.client.rpc().finalized_head().await?;
let current_block_hash = ctx.api.client.rpc().block_hash(None).await?.unwrap();

assert_ne!(event_block_hash, finalized_hash);
assert_eq!(event_block_hash, current_block_hash);
Ok(())
}

Expand Down

0 comments on commit 117e2ed

Please sign in to comment.