From c0691e24fd1cbadfb21814d3da47c7b1b23f8c00 Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Tue, 30 Jul 2024 16:10:34 +0200 Subject: [PATCH] Remove magic number --- test/test-rpc/src/client.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test-rpc/src/client.rs b/test/test-rpc/src/client.rs index 867a58bbbc21..4bbcac4908ea 100644 --- a/test/test-rpc/src/client.rs +++ b/test/test-rpc/src/client.rs @@ -10,6 +10,9 @@ use super::*; const INSTALL_TIMEOUT: Duration = Duration::from_secs(300); const REBOOT_TIMEOUT: Duration = Duration::from_secs(30); +/// How long to wait before proceeding after a reboot and a connection to the test-runner has been +/// re-established +const POST_REBOOT_GRACE_PERIOD: Duration = Duration::from_secs(5); const LOG_LEVEL_TIMEOUT: Duration = Duration::from_secs(60); const DAEMON_RESTART_TIMEOUT: Duration = Duration::from_secs(30); @@ -388,8 +391,7 @@ impl ServiceClient { self.connection_handle.reset_connected_state().await; self.connection_handle.wait_for_server().await?; - // TODO: Get rid of this magic number. - tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tokio::time::sleep(POST_REBOOT_GRACE_PERIOD).await; Ok(()) }