-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
A-developer-xpArea: developer experienceArea: developer experienceA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-highHigh priorityHigh priorityT-bugType: Something is brokenType: Something is broken
Description
Problem
test_put_contract_three_hop_returns_response fails intermittently in CI with timeout errors:
- Transaction timed out errors
- Connection already exists errors
- Times out after 120 seconds waiting for PUT response
Latest failure: https://github.com/freenet/freenet-core/actions/runs/19486370415/job/55769443837
Root Cause
The test has a known issue documented in the code itself (crates/core/tests/operations.rs:1938-1941):
// Note: We cannot modify node locations after they're created with the macro,
// so this test will use random locations. The original test had specific location
// requirements to ensure proper three-hop routing. For now, we'll proceed with
// the test and it should still validate PUT response routing.The test requires:
- Specific node topology for guaranteed three-hop routing (gateway → peer-a → intermediate → peer-c)
- Currently uses random locations which sometimes don't create the required topology
- When topology is wrong, messages don't route correctly and test times out
Impact
- Causes false-positive CI failures on unrelated PRs
- Requires manual re-runs, slowing down development
- Wastes CI resources (10+ minute timeouts)
- Creates uncertainty about actual failures vs flakes
Solution
Make the test deterministic:
-
Use fixed locations for nodes to guarantee three-hop path:
- Gateway at location 0.1
- Peer A at location 0.3
- Intermediate peer at location 0.5
- Peer C at location 0.7
-
Verify topology before running the test (assert connection graph matches expectations)
-
Replace timeout waits with condition-based polling (related to Replace fixed timing waits in tests with condition-based polling #1943)
-
Add diagnostic logging when test fails to help debug future issues
Related Issues
- Replace fixed timing waits in tests with condition-based polling #1943 - Replace fixed timing waits in tests with condition-based polling
- test: fix all ignored integration tests #2021 - Fix all ignored integration tests
Test Location
crates/core/tests/operations.rs:1922
Metadata
Metadata
Assignees
Labels
A-developer-xpArea: developer experienceArea: developer experienceA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateP-highHigh priorityHigh priorityT-bugType: Something is brokenType: Something is broken
Type
Projects
Status
Triage