diff options
Diffstat (limited to 'tests/sync')
| -rw-r--r-- | tests/sync/metrics.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/sync/metrics.rs b/tests/sync/metrics.rs index 16c95c9..987b83a 100644 --- a/tests/sync/metrics.rs +++ b/tests/sync/metrics.rs | |||
| @@ -312,13 +312,11 @@ async fn test_startup_sync_event_count() { | |||
| 312 | // 11. Check sync metrics | 312 | // 11. Check sync metrics |
| 313 | let tracked = metrics.gauge("ngit_sync_relays_tracked_total", &[]); | 313 | let tracked = metrics.gauge("ngit_sync_relays_tracked_total", &[]); |
| 314 | let connected = metrics.gauge("ngit_sync_relays_connected_total", &[]); | 314 | let connected = metrics.gauge("ngit_sync_relays_connected_total", &[]); |
| 315 | let startup_events = metrics.events_total("startup"); | 315 | let events_synced = metrics.events_synced_total(); |
| 316 | let live_events = metrics.events_total("live"); | ||
| 317 | 316 | ||
| 318 | println!("Relays tracked: {:?}", tracked); | 317 | println!("Relays tracked: {:?}", tracked); |
| 319 | println!("Relays connected: {:?}", connected); | 318 | println!("Relays connected: {:?}", connected); |
| 320 | println!("Startup events synced: {:?}", startup_events); | 319 | println!("Events synced total: {:?}", events_synced); |
| 321 | println!("Live events synced: {:?}", live_events); | ||
| 322 | 320 | ||
| 323 | // 12. Verify patches actually synced (functional check) | 321 | // 12. Verify patches actually synced (functional check) |
| 324 | let filter = Filter::new() | 322 | let filter = Filter::new() |
| @@ -447,10 +445,10 @@ async fn test_live_sync_event_count() { | |||
| 447 | tokio::time::sleep(Duration::from_secs(4)).await; | 445 | tokio::time::sleep(Duration::from_secs(4)).await; |
| 448 | let metrics = harness.get_metrics().await.unwrap(); | 446 | let metrics = harness.get_metrics().await.unwrap(); |
| 449 | 447 | ||
| 450 | let live_count = metrics.events_total("live"); | 448 | let synced_count = metrics.events_synced_total(); |
| 451 | println!("Live events synced: {:?}", live_count); | 449 | println!("Events synced total: {:?}", synced_count); |
| 452 | 450 | ||
| 453 | assert_eq!(live_count, Some(2), "Should have 2 live events"); | 451 | assert_eq!(synced_count, Some(2), "Should have 2 synced events"); |
| 454 | 452 | ||
| 455 | harness.stop_all().await; | 453 | harness.stop_all().await; |
| 456 | } | 454 | } |