From 2c91e2d31653627a8dcf0389d9bb094785dda0ef Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Mon, 11 Nov 2024 09:30:08 +0400 Subject: [PATCH] ignore state sync cucumber, flaky --- .../tests/features/state_sync.feature | 3 ++- .../tests/steps/validator_node.rs | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/integration_tests/tests/features/state_sync.feature b/integration_tests/tests/features/state_sync.feature index 9a59d66d1..2c4341a35 100644 --- a/integration_tests/tests/features/state_sync.feature +++ b/integration_tests/tests/features/state_sync.feature @@ -5,7 +5,8 @@ @state_sync Feature: State Sync - @flaky + # Ignore: this sometimes fails on CI but passes locally + @ignore Scenario: New validator node registers and syncs # Initialize a base node, wallet, miner and VN Given a base node BASE diff --git a/integration_tests/tests/steps/validator_node.rs b/integration_tests/tests/steps/validator_node.rs index dbb13df2b..d35976c18 100644 --- a/integration_tests/tests/steps/validator_node.rs +++ b/integration_tests/tests/steps/validator_node.rs @@ -450,6 +450,9 @@ async fn when_i_wait_for_validator_leaf_block_at_least(world: &mut TariWorld, na if let Some(block) = resp.blocks.first() { assert!(block.epoch().as_u64() <= epoch); + if block.epoch().as_u64() < epoch { + eprintln!("VN {name} is in {}. Waiting for epoch {epoch}", block.epoch()) + } if block.epoch().as_u64() == epoch && block.height().as_u64() >= height { return; } @@ -468,16 +471,19 @@ async fn when_i_wait_for_validator_leaf_block_at_least(world: &mut TariWorld, na }) .await .unwrap(); - let actual_height = resp + let block = resp .blocks .first() - .unwrap_or_else(|| panic!("Validator {name} has no blocks")) - .height() - .as_u64(); - if actual_height < height { + .unwrap_or_else(|| panic!("Validator {name} has no blocks")); + if block.epoch().as_u64() < epoch { + panic!("Validator {} at {} is less than epoch {}", name, block.epoch(), epoch); + } + if block.height().as_u64() < height { panic!( "Validator {} leaf block height {} is less than {}", - name, actual_height, height + name, + block.height().as_u64(), + height ); } }