From a64b5d10f61fa5665130679a953708b970f60ed9 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 15 Feb 2022 12:22:29 +0000 Subject: [PATCH] Fix flaky event subscription test --- subxt/tests/integration/events.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subxt/tests/integration/events.rs b/subxt/tests/integration/events.rs index e7625ab8af..2262860354 100644 --- a/subxt/tests/integration/events.rs +++ b/subxt/tests/integration/events.rs @@ -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(()) }