Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
chore: increase timeout on DHT node initialization, let test infra ba…
Browse files Browse the repository at this point in the history
…il if needed. (#719)
  • Loading branch information
jsantell authored Nov 13, 2023
1 parent 846fc47 commit 28304a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/noosphere-ns/src/dht/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ mod test {
use std::future::Future;
use std::time::Duration;

const NETWORK_INIT_TIMEOUT_MS: u64 = 10000;

pub async fn wait_ms(ms: u64) {
tokio::time::sleep(Duration::from_millis(ms)).await;
}
Expand Down Expand Up @@ -305,7 +307,7 @@ mod test {

// Wait for the peers to establish connections.
await_or_timeout(
5000,
NETWORK_INIT_TIMEOUT_MS,
swarm_command(nodes, |c| c.wait_for_peers(expected_peers)),
format!("waiting for {} peers", expected_peers),
)
Expand Down

0 comments on commit 28304a9

Please sign in to comment.