Skip to content

test: stabilize macOS runs by lengthening tick defaults#290

Open
alexander-akait wants to merge 1 commit intomainfrom
claude/fix-macos-test-instability-Iikuo
Open

test: stabilize macOS runs by lengthening tick defaults#290
alexander-akait wants to merge 1 commit intomainfrom
claude/fix-macos-test-instability-Iikuo

Conversation

@alexander-akait
Copy link
Copy Markdown
Member

macOS backs fs.watch with FSEvents, which has a ~100-500ms dispatch
cycle and coalesces rapid changes. The current 110ms default tick and
300-400ms beforeEach/afterEach waits race those timings, which is the
main source of macOS-only test flakes (should aggregate changes while paused, the fast DirectoryWatcher variant, residual events leaking
between tests, etc.).

  • bump the default tick to 260ms on darwin (unchanged elsewhere)
  • bump beforeEach quiesce to 700ms and afterEach to 500ms on darwin
  • bump the DirectoryWatcher "fast" interval from 50 to 150ms on darwin
    so consecutive writes are not coalesced by FSEvents

Test-only change; no library behavior is affected.

macOS backs fs.watch with FSEvents, which has a ~100-500ms dispatch
cycle and coalesces rapid changes. The current 110ms default tick and
300-400ms beforeEach/afterEach waits race those timings, which is the
main source of macOS-only test flakes (`should aggregate changes while
paused`, the `fast` DirectoryWatcher variant, residual events leaking
between tests, etc.).

- bump the default tick to 260ms on darwin (unchanged elsewhere)
- bump beforeEach quiesce to 700ms and afterEach to 500ms on darwin
- bump the DirectoryWatcher "fast" interval from 50 to 150ms on darwin
  so consecutive writes are not coalesced by FSEvents

Test-only change; no library behavior is affected.
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 17, 2026

⚠️ No Changeset found

Latest commit: d25f16e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 17, 2026

Merging this PR will not alter performance

✅ 36 untouched benchmarks


Comparing claude/fix-macos-test-instability-Iikuo (d25f16e) with main (80b6952)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.05%. Comparing base (80b6952) to head (d25f16e).

❗ There is a different number of reports uploaded between BASE (80b6952) and HEAD (d25f16e). Click for more details.

HEAD has 11 uploads less than BASE
Flag BASE (80b6952) HEAD (d25f16e)
integration 30 19
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #290       +/-   ##
===========================================
- Coverage   90.76%   76.05%   -14.71%     
===========================================
  Files           7        7               
  Lines        1115     1115               
  Branches      312      312               
===========================================
- Hits         1012      848      -164     
- Misses         91      216      +125     
- Partials       12       51       +39     
Flag Coverage Δ
integration 76.05% <ø> (-14.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

2 participants