rpc: fix a flaky test of the websocket #33002#1877
rpc: fix a flaky test of the websocket #33002#1877AnilChinchawale merged 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a flaky websocket test by ensuring a minimum timeout threshold for connection termination in the test helper code. The flakiness was caused by extremely short random timeouts (including near-zero values) that would kill connections too quickly, leading to unpredictable test behavior.
Key Changes:
- Added a minimum timeout of 10 milliseconds to the
flakeyListener.Accept()method to prevent connections from being killed too quickly during testing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
Fix a flaky test of the websocket
Ref: ethereum#33002
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that