Skip to content

Commit dd95550

Browse files
committed
tests: fix after rebase
1 parent 9aacf1d commit dd95550

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

iroh-net/src/discovery.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -662,21 +662,23 @@ mod test_dns_pkarr {
662662

663663
let cancel = CancellationToken::new();
664664
let origin = "testdns.example".to_string();
665+
let timeout = Duration::from_secs(1);
666+
665667
let (nameserver, pkarr_url, state, task) =
666668
run_dns_and_pkarr_servers(origin.clone(), cancel.clone()).await?;
667-
668669
let (relay_map, _relay_url, _relay_guard) =
669670
run_relay_server_with_pkarr(Some(pkarr_url)).await?;
671+
670672
let ep1 = ep_with_discovery_publish_relay(relay_map.clone(), nameserver, &origin).await?;
671673
let ep2 = ep_with_discovery_publish_relay(relay_map, nameserver, &origin).await?;
672674

673675
// wait until our shared state received the update from pkarr publishing
674-
state.on_update().await;
676+
state.on_node(&ep1.node_id(), timeout).await?;
675677

676678
// we connect only by node id!
677-
let ep2_node_id = ep2.node_id();
678-
let res = ep1.connect(ep2_node_id.into(), TEST_ALPN).await;
679+
let res = ep2.connect(ep1.node_id().into(), TEST_ALPN).await;
679680
assert!(res.is_ok(), "connection established");
681+
680682
cancel.cancel();
681683
task.await??;
682684
Ok(())

0 commit comments

Comments
 (0)