Skip to content

test: deflake connect-timeout watchdog#5197

Open
mcollina wants to merge 1 commit into
mainfrom
fix-5187-connect-timeout-flake
Open

test: deflake connect-timeout watchdog#5197
mcollina wants to merge 1 commit into
mainfrom
fix-5187-connect-timeout-flake

Conversation

@mcollina
Copy link
Copy Markdown
Member

@mcollina mcollina commented May 5, 2026

Summary

  • deflake the connect-timeout tests by using a shared helper for Client and Pool
  • replace the aggressive 2s watchdog with a longer guard that matches FastTimer behavior and the extra Windows setImmediate hop
  • use test-scoped cleanup that tolerates an already-closed dispatcher

Testing

  • npx borp -p "test/connect-timeout.js"
  • npx eslint test/connect-timeout.js

Closes #5187

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.22%. Comparing base (f14c445) to head (74c219a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5197      +/-   ##
==========================================
- Coverage   93.23%   93.22%   -0.01%     
==========================================
  Files         110      110              
  Lines       36599    36599              
==========================================
- Hits        34122    34119       -3     
- Misses       2477     2480       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread test/connect-timeout.js
Copy link
Copy Markdown
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge conflicts

@mcollina mcollina force-pushed the fix-5187-connect-timeout-flake branch from be6f49e to 74c219a Compare May 19, 2026 07:49
Comment thread test/connect-timeout.js
Comment on lines +54 to +59
clearTimeout(timeout)
resolve()
} catch (error) {
clearTimeout(timeout)
reject(error)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clearTimeout(timeout)
resolve()
} catch (error) {
clearTimeout(timeout)
reject(error)
}
resolve()
} catch (error) {
reject(error)
} finally {
clearTimeout(timeout)
}

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.

[flaky] test\connect-timeout.js

4 participants