upleb.uk

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

summaryrefslogtreecommitdiff
path: root/tests/sync/mod.rs
AgeCommit message (Collapse)Author
2026-02-23remove recursive relay discovery testDanConwayDev
Recursive discovery relied on announcement events being gossiped across relays regardless of whether they listed the service. Now that announcements enter purgatory until state event and git data arrive, cross-relay discovery cannot be triggered by a synced announcement alone, making the three-relay recursive discovery scenario impossible.
2026-01-09feat(sync): invalidation + immediate re-processing of maintainer announcementsDanConwayDev
- Add two-tier rejected events index (hot cache + cold index) - Hot cache: 2-minute in-memory storage of full rejected events - Cold index: 7-day metadata storage for deduplication - Immediate re-processing when owner announcements list maintainers - Fix rejection reason detection to match actual error messages - Rewrite integration tests to use two-relay sync pattern - All tests passing (3 passed, 1 ignored slow test)
2025-12-18docs: document sync test refactoring findings and patternsDanConwayDev
- Add comprehensive test pattern guidance to tests/sync/mod.rs - Explain when to use run_sync_test() vs manual setup - Document helper scope and architectural limitations Key findings: - historic_sync.rs: 4 tests refactored, 143 lines removed (50% reduction) - live_sync/discovery/tag_variations: Manual setup required due to architectural incompatibilities (timing, multi-relay, assertions) - Helper works for batch historic verification, not real-time scenarios Detailed summary available in work/sync-test-refactor-summary.md
2025-12-18refactor: rename bootstrap.rs to historic_sync.rs for clarityDanConwayDev
2025-12-11refactor: move metrics tests to tests/sync/ structure (Phase 7)DanConwayDev
2025-12-10Phase 8: Create catchup sync stub testDanConwayDev
2025-12-10Phase 5: Migrate bootstrap and discovery testsDanConwayDev
Create organized test structure for proactive sync: tests/common/sync_helpers.rs (from Phase 4): - TestClient with retry logic for connect/send - Event builders: build_layer2_issue_event, build_layer3_comment_event - Tag variants (a/A/q for Layer 2, e/E/q for Layer 3) - wait_for_event_on_relay() assertion helper - repo_coord() utility function - Unit tests for all builders tests/sync/mod.rs: - Module organization for sync tests - Documentation of test categories tests/sync.rs: - Main test harness including common and sync modules tests/sync/bootstrap.rs: - test_bootstrap_syncs_existing_layer2_events (Test 1) - test_relay_replays_events_after_restart (Test 4) tests/sync/discovery.rs: - test_discovers_layer3_via_layer2 (Test 2) - test_layer2_discovery_with_chain (Test 3 - simplified) All 14 tests pass: cargo test --test sync