Merged
Conversation
Sometimes peer disconnects with "read err: EOF" that forces reconnection and the counter assumption is off by 1
gmalouf
approved these changes
Aug 5, 2025
cce
approved these changes
Aug 5, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses network-related test flakiness by making test conditions more robust and adding debugging capabilities.
- Increased WebSocket network ready timeout from 2 to 5 seconds
- Relaxed assertion condition in P2P stream handler deduplication test to handle occasional disconnects
- Added debug logging to hybrid topology test for troubleshooting connection issues
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| network/wsNetwork_test.go | Increased ready timeout to reduce flaky timeouts |
| network/p2pNetwork_test.go | Relaxed disconnect count assertion to handle variability |
| node/node_test.go | Added debug output for connection diagnostics |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6407 +/- ##
==========================================
- Coverage 50.66% 50.47% -0.19%
==========================================
Files 661 654 -7
Lines 110781 110683 -98
==========================================
- Hits 56122 55868 -254
- Misses 51793 51935 +142
- Partials 2866 2880 +14 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wsNetwork tests: increase wait ready timeout to 5s
TestP2PwsStreamHandlerDedup: relax wait condition to handle occasional disconnects
TestNodeHybridTopology: add debug output
Test Plan
These are test fixes