upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/sync/metrics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sync/metrics.rs')
-rw-r--r--tests/sync/metrics.rs19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/sync/metrics.rs b/tests/sync/metrics.rs
index e973bbb..996c8b7 100644
--- a/tests/sync/metrics.rs
+++ b/tests/sync/metrics.rs
@@ -417,9 +417,12 @@ async fn test_live_sync_event_count() {
417 println!("Announcement set up on source relay with git data"); 417 println!("Announcement set up on source relay with git data");
418 418
419 // Start syncing relay with pre-allocated port 419 // Start syncing relay with pre-allocated port
420 let syncing_relay = 420 let syncing_relay = TestRelay::start_on_port_with_options(
421 TestRelay::start_on_port_with_options(sync_port, Some(source_relay.url().to_string()), false) 421 sync_port,
422 .await; 422 Some(source_relay.url().to_string()),
423 false,
424 )
425 .await;
423 println!("Syncing relay started at {}", syncing_relay.url()); 426 println!("Syncing relay started at {}", syncing_relay.url());
424 427
425 // Wait for sync connection to be fully established with EOSE received 428 // Wait for sync connection to be fully established with EOSE received
@@ -458,8 +461,14 @@ async fn test_live_sync_event_count() {
458 let client = TestClient::new(source_relay.url(), keys.clone()) 461 let client = TestClient::new(source_relay.url(), keys.clone())
459 .await 462 .await
460 .expect("Failed to connect to source"); 463 .expect("Failed to connect to source");
461 client.send_event(&patch1).await.expect("Failed to send patch 1"); 464 client
462 client.send_event(&patch2).await.expect("Failed to send patch 2"); 465 .send_event(&patch1)
466 .await
467 .expect("Failed to send patch 1");
468 client
469 .send_event(&patch2)
470 .await
471 .expect("Failed to send patch 2");
463 client.disconnect().await; 472 client.disconnect().await;
464 println!("Two patches sent to source relay (live mode)"); 473 println!("Two patches sent to source relay (live mode)");
465 474