Skip to content

test: reduce retry-after invalid date timing flake#5250

Open
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-retry-handler2
Open

test: reduce retry-after invalid date timing flake#5250
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-retry-handler2

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 6, 2026

This relates to...

Rationale

The throwOnError: false retry-handler test had the same intermittent timing issue that was previously fixed in test/retry-handler.js. The assertion used wall-clock time with an exact lower bound, which can be flaky around timer scheduling boundaries.

Changes

  • Reduce flakiness in the invalid retry-after date test in test/retry-handler2.js
  • Use monotonic time via process.hrtime.bigint()
  • Allow a small scheduling tolerance around the configured minTimeout

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (2b0d4c9) to head (28ee419).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5250   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files         110      110           
  Lines       36366    36366           
=======================================
  Hits        33922    33922           
  Misses       2444     2444           

☔ 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.

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/retry-handler2.js

2 participants