diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 15:39:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 15:39:48 +0000 |
| commit | 1db877d53c4ff45971c69fecc5165c352ec316c9 (patch) | |
| tree | 4e63366e49430320117ac7d207b9c2f034f8f7b5 /src/purgatory | |
| parent | 7dcbc84806e7b3000835eb9132dfc4e9003e382a (diff) | |
test: add test_state_event_syncs_from_remote integration test
Implements Phase 3 of the purgatory sync integration test plan.
Key changes:
- Add immediate sync triggering for sync-received events that go to
purgatory (instead of default 3-minute delay for user-submitted events)
- TestRelay now respects RUST_LOG environment variable for debugging
- New test verifies end-to-end flow: state event syncs from source relay,
enters purgatory, git data is fetched from source's clone URL, and
event is released and served
Diffstat (limited to 'src/purgatory')
| -rw-r--r-- | src/purgatory/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/purgatory/mod.rs b/src/purgatory/mod.rs index 7045923..894c941 100644 --- a/src/purgatory/mod.rs +++ b/src/purgatory/mod.rs | |||
| @@ -189,6 +189,8 @@ impl Purgatory { | |||
| 189 | /// | 189 | /// |
| 190 | /// Automatically enqueues the identifier for background sync with the default delay | 190 | /// Automatically enqueues the identifier for background sync with the default delay |
| 191 | /// (3 minutes), giving time for a git push to arrive after the nostr event. | 191 | /// (3 minutes), giving time for a git push to arrive after the nostr event. |
| 192 | /// For sync-triggered events, the SyncManager calls `enqueue_sync_immediate` separately | ||
| 193 | /// to override this delay. | ||
| 192 | /// | 194 | /// |
| 193 | /// # Arguments | 195 | /// # Arguments |
| 194 | /// * `event` - The state event (kind 30618) to hold | 196 | /// * `event` - The state event (kind 30618) to hold |
| @@ -210,6 +212,7 @@ impl Purgatory { | |||
| 210 | .push(entry); | 212 | .push(entry); |
| 211 | 213 | ||
| 212 | // Enqueue for background sync with default delay | 214 | // Enqueue for background sync with default delay |
| 215 | // (SyncManager will call enqueue_sync_immediate for sync-triggered events) | ||
| 213 | self.enqueue_sync_default(&identifier); | 216 | self.enqueue_sync_default(&identifier); |
| 214 | } | 217 | } |
| 215 | 218 | ||