fix(interface-compliance-tests): increase abort timeout#3462
Open
paschal533 wants to merge 2 commits intolibp2p:mainfrom
Open
fix(interface-compliance-tests): increase abort timeout#3462paschal533 wants to merge 2 commits intolibp2p:mainfrom
paschal533 wants to merge 2 commits intolibp2p:mainfrom
Conversation
…n stream muxer close test The 70ms timeout races against delay(10) loop iterations: dialer.abort() fires at t=50ms leaving only 20ms for propagation. On loaded CI runners, Node.js timer imprecision routinely exceeds this margin, causing spurious failures. 2000ms is a generous upper bound — on success the test exits well under 100ms; the timeout only fires if abort genuinely fails to propagate.
Member
|
this should have be fixed in #3422 |
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.
Problem
The "calling abort aborts streams" test in the stream muxer compliance suite was flaky on loaded CI runners.
The test structure:
infiniteRandomyields values withawait delay(10)per iterationdialer.abort()is called at t=50mssetTimeoutraces against the abort with a 70ms deadlineThis leaves only a 20ms window after the abort call for propagation to complete. Node.js timer imprecision on a loaded runner routinely exceeds 15–50ms, causing the timeout to fire before abort propagation finishes.
Solution
Increase the timeout from 70ms to 2000ms. On success, the test exits well under 100ms. The 2000ms only fires if abort genuinely fails to propagate, making the test a true failure detector rather than a race against the scheduler.
Test plan
Related PRs
This is one of four focused fixes split from #3406 as requested by @dozyio:
UnexpectedEOFErrorrace inreadCandidatesUntilConnected'disconnected'as a terminal peer connection state