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:
Diffstat (limited to 'tests/sync/live_sync.rs')
-rw-r--r--tests/sync/live_sync.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/sync/live_sync.rs b/tests/sync/live_sync.rs
index 7fa08a0..8ee3119 100644
--- a/tests/sync/live_sync.rs
+++ b/tests/sync/live_sync.rs
@@ -115,7 +115,7 @@ async fn test_live_sync_layer2_events() {
115 115
116 // 9. Wait and verify event syncs to relay_b 116 // 9. Wait and verify event syncs to relay_b
117 let filter = Filter::new() 117 let filter = Filter::new()
118 .kind(Kind::Custom(KIND_ISSUE)) 118 .kind(Kind::GitIssue)
119 .author(keys.public_key()) 119 .author(keys.public_key())
120 .id(issue_id); 120 .id(issue_id);
121 121
@@ -237,7 +237,7 @@ async fn test_live_sync_layer3_events() {
237 // 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)
238 tokio::time::sleep(Duration::from_secs(2)).await; 238 tokio::time::sleep(Duration::from_secs(2)).await;
239 239
240 let issue_filter = Filter::new().kind(Kind::Custom(KIND_ISSUE)).id(issue_id); 240 let issue_filter = Filter::new().kind(Kind::GitIssue).id(issue_id);
241 let issue_synced = 241 let issue_synced =
242 wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(3)).await; 242 wait_for_event_on_relay(relay_b.url(), issue_filter, Duration::from_secs(3)).await;
243 println!("Issue synced to relay_b: {}", issue_synced); 243 println!("Issue synced to relay_b: {}", issue_synced);
@@ -247,7 +247,7 @@ async fn test_live_sync_layer3_events() {
247 247
248 // 7. Wait and verify comment syncs to relay_b 248 // 7. Wait and verify comment syncs to relay_b
249 let comment_filter = Filter::new() 249 let comment_filter = Filter::new()
250 .kind(Kind::Custom(KIND_COMMENT)) 250 .kind(Kind::Comment)
251 .author(keys.public_key()) 251 .author(keys.public_key())
252 .id(comment_id); 252 .id(comment_id);
253 253
@@ -267,9 +267,7 @@ async fn test_live_sync_layer3_events() {
267 client.connect().await; 267 client.connect().await;
268 tokio::time::sleep(Duration::from_millis(500)).await; 268 tokio::time::sleep(Duration::from_millis(500)).await;
269 269
270 let fetch_filter = Filter::new() 270 let fetch_filter = Filter::new().kind(Kind::Comment).id(comment_id);
271 .kind(Kind::Custom(KIND_COMMENT))
272 .id(comment_id);
273 271
274 if let Ok(events) = client 272 if let Ok(events) = client
275 .fetch_events(fetch_filter, Duration::from_secs(2)) 273 .fetch_events(fetch_filter, Duration::from_secs(2))
@@ -418,9 +416,7 @@ async fn test_live_sync_event_ordering() {
418 client.connect().await; 416 client.connect().await;
419 tokio::time::sleep(Duration::from_millis(500)).await; 417 tokio::time::sleep(Duration::from_millis(500)).await;
420 418
421 let filter = Filter::new() 419 let filter = Filter::new().kind(Kind::GitIssue).author(keys.public_key());
422 .kind(Kind::Custom(KIND_ISSUE))
423 .author(keys.public_key());
424 420
425 match client.fetch_events(filter, Duration::from_secs(3)).await { 421 match client.fetch_events(filter, Duration::from_secs(3)).await {
426 Ok(events) => { 422 Ok(events) => {