Skip to content

Commit

Permalink
test: fix: connectivity-check
Browse files Browse the repository at this point in the history
  • Loading branch information
akiradeveloper committed Oct 30, 2024
1 parent ed1de94 commit 881c593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tests/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,11 @@ impl Env {
.or_insert_with(|| port_check::free_local_ipv4_port().unwrap());
let snap_states = self.penv.as_mut().map(|env| env.get(id));
let node = Node::new(id, free_port, self.n_shards, snap_states).unwrap();
port_check::is_port_reachable_with_timeout(
assert!(port_check::is_port_reachable_with_timeout(
node.address().to_string(),
Duration::from_secs(5),
);
));

self.nodes.insert(id, node);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/sorock-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Builder {
let mut env = Env::new(p, self.with_persistency, self.with_logging);
for id in 0..n {
env.add_node(id);
env.check_connectivity(0).await?;
env.check_connectivity(id).await?;
}
Ok(Cluster { env })
}
Expand Down

0 comments on commit 881c593

Please sign in to comment.