From b722a34102f8a2bd705e85236935b2c756394b15 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 13 Dec 2022 09:20:03 +1000 Subject: [PATCH] fix(rpc): Wait for 3 minutes to check Zebra is synced to the tip, rather than 2 (#5840) * Wait for 3 minutes to check Zebra is synced to the tip, rather than 2 * Increase the MockService request timeout --- zebra-test/src/mock_service.rs | 5 +++-- zebrad/src/components/sync/recent_sync_lengths.rs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zebra-test/src/mock_service.rs b/zebra-test/src/mock_service.rs index e919a36d..ef1dc412 100644 --- a/zebra-test/src/mock_service.rs +++ b/zebra-test/src/mock_service.rs @@ -77,8 +77,9 @@ const DEFAULT_PROXY_CHANNEL_SIZE: usize = 100; /// Note that if a test checks that no requests are received, each check has to wait for this /// amount of time, so this may affect the test execution time. /// -/// We've seen delays up to 67ms on busy Linux and macOS machines. -pub const DEFAULT_MAX_REQUEST_DELAY: Duration = Duration::from_millis(150); +/// We've seen delays up to 67ms on busy Linux and macOS machines, +/// and some other timeout failures even with a 150ms timeout. +pub const DEFAULT_MAX_REQUEST_DELAY: Duration = Duration::from_millis(300); /// An internal type representing the item that's sent in the [`broadcast`] channel. /// diff --git a/zebrad/src/components/sync/recent_sync_lengths.rs b/zebrad/src/components/sync/recent_sync_lengths.rs index acf32f07..ca2fd589 100644 --- a/zebrad/src/components/sync/recent_sync_lengths.rs +++ b/zebrad/src/components/sync/recent_sync_lengths.rs @@ -31,7 +31,7 @@ impl RecentSyncLengths { /// * clearing temporary errors and temporary syncs quickly /// * distinguishing between temporary and sustained syncs/errors /// * activating the syncer shortly after reaching the chain tip - pub const MAX_RECENT_LENGTHS: usize = 2; + pub const MAX_RECENT_LENGTHS: usize = 3; /// Create a new instance of [`RecentSyncLengths`] /// and a [`watch::Receiver`] endpoint for receiving recent sync lengths.