From 15ef933c2d4e73dc60f0d076be61c548d40b5f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9o=20Goulois?= Date: Mon, 9 Nov 2026 21:19:19 +0100 Subject: [PATCH] test(remote): wait for B's own link before testing the pairing limit after a reconnect The v1.7.0 release run failed on Linux: A saw B again before B's link had reconnected, so the pairing request could end for another reason than the limit. The test now waits for B's link too, and prints the event it got. --- src/daemon/remote/tests.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/daemon/remote/tests.rs b/src/daemon/remote/tests.rs index ab505d2..da8ab38 100644 --- a/src/daemon/remote/tests.rs +++ b/src/daemon/remote/tests.rs @@ -1589,11 +1589,18 @@ async fn reconnecting_does_not_reset_the_pairing_limit() { }) .await; wait_until("A sees B again", || a.sees("mB")).await; + // B's own link must be back too, or the request can end for another + // reason than the limit (seen on a loaded CI runner). + wait_until("B's link is connected again", || { + b.link.status().relay == RelayState::Connected + }) + .await; let mut events = a.link.pair(&b.id).await.unwrap(); - let PairEvent::Cancelled { reason, .. } = next_pair_event(&mut events).await else { - panic!("not busy"); + let event = next_pair_event(&mut events).await; + let PairEvent::Cancelled { reason, .. } = &event else { + panic!("not busy: {event:?}"); }; - assert_eq!(reason, "busy"); + assert_eq!(reason, "busy", "{event:?}"); } #[tokio::test]