Skip to content

Commit 74c1de5

Browse files
Remove magic number
1 parent b920da3 commit 74c1de5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test-rpc/src/client.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ use super::*;
1010

1111
const INSTALL_TIMEOUT: Duration = Duration::from_secs(300);
1212
const REBOOT_TIMEOUT: Duration = Duration::from_secs(30);
13+
/// How long to wait before proceeding after a reboot and a connection to the test-runner has been
14+
/// re-established
15+
const POST_REBOOT_GRACE_PERIOD: Duration = Duration::from_secs(5);
1316
const LOG_LEVEL_TIMEOUT: Duration = Duration::from_secs(60);
1417
const DAEMON_RESTART_TIMEOUT: Duration = Duration::from_secs(30);
1518

@@ -388,8 +391,7 @@ impl ServiceClient {
388391
self.connection_handle.reset_connected_state().await;
389392
self.connection_handle.wait_for_server().await?;
390393

391-
// TODO: Get rid of this magic number.
392-
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
394+
tokio::time::sleep(POST_REBOOT_GRACE_PERIOD).await;
393395

394396
Ok(())
395397
}

0 commit comments

Comments
 (0)