From 4b8b65a62747b2d06d595b85a4e6a2fcef8d8f19 Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 20 Oct 2021 01:29:03 +1000 Subject: [PATCH] Avoid spurious acceptance test failures by decreasing the peer crawler timeout (#2905) * Improve logging for initial peer connections * Decrease the initial peer crawl timeout to make tests more reliable Co-authored-by: Conrado Gouvea --- zebra-network/src/peer_set/candidate_set.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zebra-network/src/peer_set/candidate_set.rs b/zebra-network/src/peer_set/candidate_set.rs index f61853d6..b14e2b6e 100644 --- a/zebra-network/src/peer_set/candidate_set.rs +++ b/zebra-network/src/peer_set/candidate_set.rs @@ -196,8 +196,11 @@ where // - we're waiting on a handshake to complete so there are peers, or // - another task that handles or adds peers is waiting on this task // to complete. - if let Ok(fanout_result) = - timeout(constants::REQUEST_TIMEOUT, self.update_fanout(fanout_limit)).await + if let Ok(fanout_result) = timeout( + constants::MIN_PEER_GET_ADDR_INTERVAL, + self.update_fanout(fanout_limit), + ) + .await { fanout_result?; } else {