From 7d72ef92082f726a8b906f1b2c66b4978b1a13d9 Mon Sep 17 00:00:00 2001 From: Daniil Polyakov Date: Wed, 27 May 2026 22:39:04 +0300 Subject: [PATCH] fix(integration_tests/indexer): adjust l2 to l1 timeout to satisfy CI --- integration_tests/tests/indexer.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 5cf33cde..6bac8bef 100644 --- a/integration_tests/tests/indexer.rs +++ b/integration_tests/tests/indexer.rs @@ -20,13 +20,12 @@ use wallet::{ }; /// Maximum time to wait for the indexer to catch up to the sequencer. -const L2_TO_L1_TIMEOUT_MILLIS: u64 = 180_000; +const L2_TO_L1_TIMEOUT: Duration = Duration::from_mins(5); /// Poll the indexer until its last finalized block id reaches the sequencer's /// current last block id or until [`L2_TO_L1_TIMEOUT_MILLIS`] elapses. /// Returns the last indexer block id observed. async fn wait_for_indexer_to_catch_up(ctx: &TestContext) -> Result { - let timeout = Duration::from_millis(L2_TO_L1_TIMEOUT_MILLIS); let block_id_to_catch_up = sequencer_service_rpc::RpcClient::get_last_block_id(ctx.sequencer_client()).await?; let mut last_ind: u64 = 1; @@ -50,11 +49,11 @@ async fn wait_for_indexer_to_catch_up(ctx: &TestContext) -> Result { tokio::time::sleep(Duration::from_secs(2)).await; } }; - tokio::time::timeout(timeout, inner) + tokio::time::timeout(L2_TO_L1_TIMEOUT, inner) .await .with_context(|| { format!( - "Indexer failed to catch up within {L2_TO_L1_TIMEOUT_MILLIS} milliseconds. Last indexer block id observed: {last_ind}, but needed to catch up to at least {block_id_to_catch_up}" + "Indexer failed to catch up within {L2_TO_L1_TIMEOUT:?}. Last indexer block id observed: {last_ind}, but needed to catch up to at least {block_id_to_catch_up}" ) })? }