paritytech / subxt

Interact with Substrate based nodes in Rust or WebAssembly
Other
391 stars 236 forks source link

Flaky testcase `full_client::client::unstable_rpcs::chainhead_v1_follow` #1588

Closed pkhry closed 1 month ago

pkhry commented 1 month ago

Explanation

The test fails because it asserts that finalized block hashes are exactly equal and doesn't account for chain progress that could happen, so the test will fail with an example error message:

thread 'full_client::client::unstable_rpcs::chainhead_v1_follow' panicked at testing/integration-tests/src/full_client/client/unstable_rpcs.rs:35:5:
assertion `left == right` failed
  left: Initialized(Initialized { finalized_block_hashes: [0xa7764f9b0dab002dc15d05faa51f9249190f89a8877470bd759d88683005f47b, 0x11cf3f55774cb66de344947198b5f26768d763c983ac53b243294bd1fe40066d], finalized_block_runtime: None })
 right: Initialized(Initialized { finalized_block_hashes: [0x11cf3f55774cb66de344947198b5f26768d763c983ac53b243294bd1fe40066d], finalized_block_runtime: None })

Solution:

in assertions check that finalized_block_hashes contain given finalized_block_hash