Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fixed flaky test on macOS #2790

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

jsumners-nr
Copy link
Contributor

@jsumners-nr jsumners-nr commented Nov 25, 2024

This PR fixes a set of flaky tests on macOS. I think the problem is due to the way macOS file system does things. This answer indicates that access times are wonky on APFS to begin with. I tried several variations to try and fudge the time of file creation and then verification, but I always ended up with a failure. Sometimes it would take a couple of seconds to hit the error, other times it would take a minute or so. Regardless, it always fails on macOS when trying to test the modified access time.

I do not have a Linux or Windows system available for work to verify any of these guesses, though. So it could be a flake that we are just lucky doesn't hit in CI.

For what it's worth, I verified my attempts with:

time while \
  node --trace-warnings --test-name-pattern 'utimes' --test test/integration/core/fs.test.js;
  [ $? -eq 0 ];
do true;
done;

Also, I opened a discussion to try and get some more insight. Maybe someone will answer with information that let's us properly fix this.

@jsumners-nr jsumners-nr added the dev:tests Indicates only changes to tests label Nov 25, 2024
@jsumners-nr jsumners-nr marked this pull request as ready for review November 25, 2024 14:29
@jsumners-nr jsumners-nr merged commit eebf06b into newrelic:main Nov 25, 2024
29 checks passed
@jsumners-nr jsumners-nr deleted the utimes-flake branch November 25, 2024 14:35
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.10%. Comparing base (ee24027) to head (b10e3b6).
Report is 1 commits behind head on main.

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

HEAD has 8 uploads less than BASE
Flag BASE (ee24027) HEAD (b10e3b6)
unit-tests-20.x 1 0
unit-tests-18.x 1 0
unit-tests-22.x 1 0
integration-tests-cjs-20.x 1 0
integration-tests-cjs-18.x 1 0
integration-tests-cjs-22.x 1 0
integration-tests-esm-20.x 1 0
integration-tests-esm-22.x 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2790       +/-   ##
===========================================
- Coverage   97.26%   79.10%   -18.16%     
===========================================
  Files         294      284       -10     
  Lines       46315    45148     -1167     
===========================================
- Hits        45047    35716     -9331     
- Misses       1268     9432     +8164     
Flag Coverage Δ
integration-tests-cjs-18.x ?
integration-tests-cjs-20.x ?
integration-tests-cjs-22.x ?
integration-tests-esm-18.x 49.97% <ø> (ø)
integration-tests-esm-20.x ?
integration-tests-esm-22.x ?
unit-tests-18.x ?
unit-tests-20.x ?
unit-tests-22.x ?
versioned-tests-18.x 78.99% <ø> (-0.20%) ⬇️
versioned-tests-20.x 79.02% <ø> (-0.17%) ⬇️
versioned-tests-22.x 79.02% <ø> (-0.17%) ⬇️

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.


🚨 Try these New Features:

@github-actions github-actions bot mentioned this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants