diff --git a/tests/sync/historic_sync.rs b/tests/sync/historic_sync.rs index 8db7a43..efd2e24 100644 --- a/tests/sync/historic_sync.rs +++ b/tests/sync/historic_sync.rs @@ -454,7 +454,7 @@ async fn test_pagination_for_large_historic_sync() { .add_relay(syncing.url()) .await .expect("Failed to add syncing relay to client"); - client.connect().and_wait(Duration::from_secs(30)).await; + crate::common::relay::connect_client(&client).await; // Poll until every issue has paginated across, up to a bounded deadline. let deadline = tokio::time::Instant::now() + Duration::from_secs(30); diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs index b815355..a12966c 100644 --- a/tests/sync/live_sync.rs +++ b/tests/sync/live_sync.rs @@ -486,7 +486,7 @@ async fn test_live_sync_layer3_events() { .authenticator(SignerAuthenticator::new(temp_keys)) .build(); if client.add_relay(relay_b.url()).await.is_ok() { - client.connect().and_wait(Duration::from_secs(30)).await; + crate::common::relay::connect_client(&client).await; let fetch_filter = Filter::new().kind(Kind::Comment).id(comment_id); @@ -642,7 +642,7 @@ async fn test_live_sync_event_ordering() { let events_found: Vec; if client.add_relay(relay_b.url()).await.is_ok() { - client.connect().and_wait(Duration::from_secs(30)).await; + crate::common::relay::connect_client(&client).await; let filter = Filter::new().kind(Kind::GitIssue).author(keys.public_key()); diff --git a/tests/sync/purgatory_fetch.rs b/tests/sync/purgatory_fetch.rs index 3fc4f90..92bee40 100644 --- a/tests/sync/purgatory_fetch.rs +++ b/tests/sync/purgatory_fetch.rs @@ -159,10 +159,7 @@ async fn purgatory_fetch_batches_available_tips_and_isolates_missing_oids() { .add_relay(source.url()) .await .expect("add source relay"); - source_client - .connect() - .and_wait(Duration::from_secs(30)) - .await; + crate::common::relay::connect_client(&source_client).await; source_client .send_event(&source_announcement) .await @@ -239,10 +236,7 @@ async fn purgatory_fetch_batches_available_tips_and_isolates_missing_oids() { .add_relay(mock.url()) .await .expect("add mock relay"); - mock_client - .connect() - .and_wait(Duration::from_secs(30)) - .await; + crate::common::relay::connect_client(&mock_client).await; mock_client .send_event(&syncing_announcement) .await