upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-19 09:36:17 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-19 09:36:17 +0000
commit73a89750c842af98ca0e064dd1c1cac1875214d1 (patch)
tree322707d7251a8bd3e6f7cdee321d87941c4c807c /tests
parent39e4fa068364ff0be14c6d1fcf89591feba2a14f (diff)
test: fix test_multi_source_aggregate_counts
Diffstat (limited to 'tests')
-rw-r--r--tests/sync/metrics.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/sync/metrics.rs b/tests/sync/metrics.rs
index 7675489..16c95c9 100644
--- a/tests/sync/metrics.rs
+++ b/tests/sync/metrics.rs
@@ -563,10 +563,7 @@ async fn test_multi_source_aggregate_counts() {
563 &[&harness.source_domain(0), &sync_domain], 563 &[&harness.source_domain(0), &sync_domain],
564 "test-repo", 564 "test-repo",
565 ); 565 );
566 harness 566 harness.submit_events(0, &[announcement]).await.unwrap();
567 .submit_events(0, &[announcement])
568 .await
569 .unwrap();
570 567
571 // Now start syncing relay - it should sync the existing announcement 568 // Now start syncing relay - it should sync the existing announcement
572 harness.start_syncing_relay_on_port(0, sync_port).await; 569 harness.start_syncing_relay_on_port(0, sync_port).await;
@@ -590,8 +587,6 @@ async fn test_multi_source_aggregate_counts() {
590 587
591 // Stop source, verify connected drops to 0 588 // Stop source, verify connected drops to 0
592 harness.stop_source(0).await; 589 harness.stop_source(0).await;
593 // Wait longer for disconnect to be detected and metrics updated
594 tokio::time::sleep(Duration::from_secs(4)).await;
595 590
596 let metrics = harness.get_metrics().await.unwrap(); 591 let metrics = harness.get_metrics().await.unwrap();
597 592
@@ -612,7 +607,7 @@ async fn test_multi_source_aggregate_counts() {
612 assert_eq!( 607 assert_eq!(
613 metrics.relays_connected_total(), 608 metrics.relays_connected_total(),
614 Some(0), 609 Some(0),
615 "Should have 0 connected" 610 "Should have 0 connected (waited up to 10s for disconnect detection)"
616 ); 611 );
617 612
618 harness.stop_all().await; 613 harness.stop_all().await;