diff --git a/runtime/integration-tests/src/generic/cases/routers.rs b/runtime/integration-tests/src/generic/cases/routers.rs index 5900f1a9e2..7abb3bf99a 100644 --- a/runtime/integration-tests/src/generic/cases/routers.rs +++ b/runtime/integration-tests/src/generic/cases/routers.rs @@ -76,14 +76,8 @@ fn environment_for_evm() -> FudgeEnv { env.parachain_state_mut(|| { pallet_evm::AccountCodes::::insert(AXELAR_CONTRACT_ADDRESS, AXELAR_CONTRACT_CODE); - utils::evm::mint_balance_into_derived_account::( - AXELAR_CONTRACT_ADDRESS, - cfg(1_000_000_000), - ); - utils::evm::mint_balance_into_derived_account::( - get_gateway_h160_account::(), - cfg(1_000_000), - ); + utils::evm::mint_balance_into_derived_account::(AXELAR_CONTRACT_ADDRESS, cfg(1)); + utils::evm::mint_balance_into_derived_account::(get_gateway_h160_account::(), cfg(1)); }); env @@ -140,12 +134,9 @@ fn check_submission(mut env: impl Env, domain_router: DomainRoute }); env.pass(Blocks::UntilEvent { - event: expected_event.clone().into(), + event: expected_event.into(), limit: 3, }); - - env.check_event(expected_event) - .expect("expected OutboundMessageExecutionSuccess event"); } #[test_runtimes(all)] diff --git a/runtime/integration-tests/src/generic/env.rs b/runtime/integration-tests/src/generic/env.rs index c6e58ed7f2..ea28267154 100644 --- a/runtime/integration-tests/src/generic/env.rs +++ b/runtime/integration-tests/src/generic/env.rs @@ -111,15 +111,23 @@ pub trait Env: Default { ) }); + let mut found_event = false; for i in blocks.range_for(current, slot) { self.__priv_build_block(i); if let Blocks::UntilEvent { event, .. } = blocks.clone() { if self.check_event(event).is_some() { + found_event = true; break; } } } + + if let Blocks::UntilEvent { event, limit } = blocks.clone() { + if !found_event { + panic!("Event {event:?} was not found producing {limit} blocks"); + } + } } /// Allows to mutate the relay storage state through the closure.