From b6c908599c1e63852b8d3b4b20caae344e37a34a Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 10 Dec 2025 17:11:52 +0000 Subject: test(sync): add wait_for_sync_connection helper for improved reliability --- tests/sync/bootstrap.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/sync/bootstrap.rs') diff --git a/tests/sync/bootstrap.rs b/tests/sync/bootstrap.rs index 506a262..0d68609 100644 --- a/tests/sync/bootstrap.rs +++ b/tests/sync/bootstrap.rs @@ -246,7 +246,11 @@ async fn test_announcement_not_listing_relay_is_not_synced() { let keys = Keys::generate(); // 4. Wait for relay_b's sync connection to establish - tokio::time::sleep(Duration::from_secs(1)).await; + // Use the sync connection helper for more reliable connection verification + match wait_for_sync_connection(relay_b.url(), 1, Duration::from_secs(5)).await { + Ok(()) => println!("Sync connection established (verified via metrics)"), + Err(e) => println!("Sync connection check: {} (continuing with test)", e), + } // 5. Create a repository announcement that lists ONLY relay_a // This should NOT sync to relay_b because relay_b's write policy -- cgit v1.2.3