From 593aefd2295b4a5bdc426ec5bf24546483b52105 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 18 Apr 2024 02:51:38 -0400 Subject: [PATCH] Extend time in sync test --- coordinator/src/p2p.rs | 4 ++-- coordinator/src/tests/tributary/sync.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coordinator/src/p2p.rs b/coordinator/src/p2p.rs index 8fdb2e81d..48a23aa5c 100644 --- a/coordinator/src/p2p.rs +++ b/coordinator/src/p2p.rs @@ -715,12 +715,12 @@ pub async fn handle_p2p_task( { if our_key == validator.0 { selected = true; - break; + continue; } } if !selected { log::debug!("received heartbeat and not selected to respond"); - return; + continue; } log::debug!("received heartbeat and selected to respond"); diff --git a/coordinator/src/tests/tributary/sync.rs b/coordinator/src/tests/tributary/sync.rs index 1af08fa82..9f01ca4df 100644 --- a/coordinator/src/tests/tributary/sync.rs +++ b/coordinator/src/tests/tributary/sync.rs @@ -121,8 +121,8 @@ async fn sync_test() { .map_err(|_| "failed to send ActiveTributary to heartbeat") .unwrap(); - // The heartbeat is once every 10 blocks - sleep(Duration::from_secs(10 * block_time)).await; + // The heartbeat is once every 10 blocks, with some limitations + sleep(Duration::from_secs(20 * block_time)).await; assert!(syncer_tributary.tip().await != spec.genesis()); // Verify it synced to the tip