upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/sync/live_sync.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 16:53:03 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 16:53:03 +0000
commit2a9160836bb87fdea3ae891563b0169c68d1c2ab (patch)
tree583c890687beaf7f380fc0be131bdf17485f06fa /tests/sync/live_sync.rs
parent52489d3b1a7d79e164b4cc901b53fd06c05ce1b1 (diff)
fix: resolve all fmt and clippy warnings
Main lib (src/): - Add #[allow(dead_code)] for build_info field (stored to prevent Prometheus unregistration) - Add #[allow(dead_code)] for first_seen field (reserved for future rate limiting) - Replace .or_insert_with(RelaySyncNeeds::default) with .or_default() - Replace manual div_ceil implementations with .div_ceil(100) Test code (tests/): - Replace .expect(&format!(...)) with .unwrap_or_else(|_| panic!(...)) - Remove needless borrows in fetch_metrics() calls - Add #[allow(dead_code)] and #[allow(unused_imports)] to test helpers module grasp-audit: - Apply cargo fmt to fix formatting
Diffstat (limited to 'tests/sync/live_sync.rs')
-rw-r--r--tests/sync/live_sync.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs
index ebe1c0b..7fa08a0 100644
--- a/tests/sync/live_sync.rs
+++ b/tests/sync/live_sync.rs
@@ -229,7 +229,10 @@ async fn test_live_sync_layer3_events() {
229 .send_event(&comment) 229 .send_event(&comment)
230 .await 230 .await
231 .expect("Failed to send comment"); 231 .expect("Failed to send comment");
232 println!("Layer 3 comment {} sent to relay_a BEFORE Layer 3 subscription established", comment_id); 232 println!(
233 "Layer 3 comment {} sent to relay_a BEFORE Layer 3 subscription established",
234 comment_id
235 );
233 236
234 // 6. Now wait for issue to sync to relay_b (this triggers Layer 3 filter creation) 237 // 6. Now wait for issue to sync to relay_b (this triggers Layer 3 filter creation)
235 tokio::time::sleep(Duration::from_secs(2)).await; 238 tokio::time::sleep(Duration::from_secs(2)).await;
@@ -394,7 +397,7 @@ async fn test_live_sync_event_ordering() {
394 client_a 397 client_a
395 .send_event(&issue) 398 .send_event(&issue)
396 .await 399 .await
397 .expect(&format!("Failed to send issue {}", i)); 400 .unwrap_or_else(|_| panic!("Failed to send issue {}", i));
398 401
399 // Delay between events to ensure different timestamps 402 // Delay between events to ensure different timestamps
400 tokio::time::sleep(Duration::from_millis(150)).await; 403 tokio::time::sleep(Duration::from_millis(150)).await;