Skip to content

Commit 112ea52

Browse files
committed
Increase timeout duration and retry count in internet readiness checks
1 parent a762c51 commit 112ea52

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,17 @@ mod tests {
5555
async fn wait_for_public_internet_ready(backend: &Backend) -> anyhow::Result<()> {
5656
let mut rx = backend.subscribe_updates().await.ok_or_else(|| anyhow::anyhow!("No update receiver"))?;
5757

58-
// Use a shorter timeout for tests (10 seconds)
5958
let timeout = if cfg!(test) {
60-
Duration::from_secs(10)
59+
Duration::from_secs(15)
6160
} else {
6261
Duration::from_secs(30)
6362
};
6463

6564
log::info!("Waiting for public internet to be ready (timeout: {:?})", timeout);
6665

67-
// Try up to 3 times with exponential backoff
66+
// Try up to 6 times with exponential backoff
6867
let mut retry_count = 0;
69-
let max_retries = 3;
68+
let max_retries = 6;
7069

7170
while retry_count < max_retries {
7271
match tokio::time::timeout(timeout, async {

0 commit comments

Comments
 (0)