From f011af063de4e767cada325e079bdd68fe64f051 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Sun, 14 May 2023 17:51:14 +0300 Subject: [PATCH] Increase timeout when stopping a service in tests. I've seen a few test failures with error: pageserver stop failed: pageserver with pid 115851 did not stop in 10 seconds These have all been with tests that use real S3. Pageserver shutdown waits for all in-memory layers to be flush to disk and uploaded to remote storage, so I think it's reasonable that that might take longer than 10 s if there's some kind of a network hiccup. --- control_plane/src/background_process.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control_plane/src/background_process.rs b/control_plane/src/background_process.rs index 1f3f8f45ea..c746c15fff 100644 --- a/control_plane/src/background_process.rs +++ b/control_plane/src/background_process.rs @@ -30,12 +30,12 @@ use utils::pid_file::{self, PidFileRead}; // These constants control the loop used to poll for process start / stop. // -// The loop waits for at most 10 seconds, polling every 100 ms. +// The loop waits for at most 20 seconds, polling every 100 ms. // Once a second, it prints a dot ("."), to give the user an indication that // it's waiting. If the process hasn't started/stopped after 5 seconds, // it prints a notice that it's taking long, but keeps waiting. // -const RETRY_UNTIL_SECS: u64 = 10; +const RETRY_UNTIL_SECS: u64 = 20; const RETRIES: u64 = (RETRY_UNTIL_SECS * 1000) / RETRY_INTERVAL_MILLIS; const RETRY_INTERVAL_MILLIS: u64 = 100; const DOT_EVERY_RETRIES: u64 = 10;