Skip to content

Commit

Permalink
test(iroh-net): increase timeout for local swarm discovery test (#2574)
Browse files Browse the repository at this point in the history
## Description
The `local_swarm_discovery` test was reliably timing out when run on the
linux CI. After checking the logs and NOT finding any evidence that
anything goes wrong, I increased the timeout and can no longer trigger
the failure.

## Change checklist

- [x] Self-review.

---------

Co-authored-by: Kasey Huizinga <ramfox@Kaseys-MBP.lan>
  • Loading branch information
ramfox and Kasey Huizinga authored Aug 3, 2024
1 parent 1ba033c commit 605a85d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions iroh-net/src/discovery/local_swarm_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ mod tests {
use testresult::TestResult;

#[tokio::test]
#[ignore = "flaky"]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
let (node_id_a, discovery_a) = make_discoverer()?;
let (_, discovery_b) = make_discoverer()?;

Expand All @@ -312,12 +312,13 @@ mod tests {
// resolve twice to ensure we can create separate streams for the same node_id
let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
tracing::debug!(?node_id_a, "Discovering node id a");
// publish discovery_a's address
discovery_a.publish(&addr_info);
let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
.await?
.unwrap()?;
let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
Expand Down

0 comments on commit 605a85d

Please sign in to comment.