Skip to content

fix(interface-compliance-tests): increase abort timeout#3462

Open
paschal533 wants to merge 2 commits intolibp2p:mainfrom
paschal533:fix/stream-muxer-abort-timeout
Open

fix(interface-compliance-tests): increase abort timeout#3462
paschal533 wants to merge 2 commits intolibp2p:mainfrom
paschal533:fix/stream-muxer-abort-timeout

Conversation

@paschal533
Copy link
Copy Markdown
Contributor

Problem

The "calling abort aborts streams" test in the stream muxer compliance suite was flaky on loaded CI runners.

The test structure:

  • infiniteRandom yields values with await delay(10) per iteration
  • dialer.abort() is called at t=50ms
  • A setTimeout races against the abort with a 70ms deadline

This 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

  • "calling abort aborts streams" passes reliably on CI
  • On success the test completes in <100ms (no slowdown on happy path)

Related PRs

This is one of four focused fixes split from #3406 as requested by @dozyio:

  • fix(transport-webrtc): check initial peer connection state at construction time
  • fix(transport-webrtc): fix UnexpectedEOFError race in readCandidatesUntilConnected
  • fix(transport-webrtc): do not treat 'disconnected' as a terminal peer connection state
  • This PR — stream muxer abort timeout

…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.
@paschal533 paschal533 requested a review from a team as a code owner April 17, 2026 11:43
@paschal533 paschal533 changed the title fix(interface-compliance-tests): increase abort propagation timeout in stream muxer close test fix(interface-compliance-tests): increase abort timeout Apr 17, 2026
@tabcat
Copy link
Copy Markdown
Member

tabcat commented Apr 18, 2026

this should have be fixed in #3422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants