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: refactor windows shim tests #6576

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Conversation

lukekarrys
Copy link
Contributor

@lukekarrys lukekarrys commented Jun 20, 2023

This fixed some flakiness in the windows shim tests. The relevant portion of the fix was to move the t.testdir call to the very first thing in the test. Not sure why this was the case, since tap should be able to handle doing that in multiple tests. From the docs:

While the fixture directory is created synchronously, it is removed asynchronously, because that is the only way to get around ENOTEMPTY errors on Windows.

This means that the next test after one that uses t.testdir() will be deferred until after the end of the current run to completion.

Either way, I ran these tests 3 times and got no flakes. Previously at least one test was flaking every time, so I'm confident that it at least works, even if I'm not 100% sure why.

The rest of the changes were refactoring that I ended up with as I was debugging to see what the issue was.

@lukekarrys lukekarrys requested a review from a team as a code owner June 20, 2023 17:50
@lukekarrys lukekarrys force-pushed the lk/flaky-windows-shim-tests branch 14 times, most recently from fafabe5 to 282eb1e Compare June 20, 2023 21:46
@npm-cli-bot
Copy link
Collaborator

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
show-version run-script
npm@9 40.906 ±0.82 17.139 ±0.03 16.515 ±0.06 19.059 ±1.01 2.659 ±0.06 2.669 ±0.04 2.152 ±0.00 11.282 ±0.03 2.185 ±0.00 3.320 ±0.16 0.364 ±0.00 0.413 ±0.01
#6576 40.690 ±1.26 17.088 ±0.16 16.703 ±0.03 19.129 ±0.40 2.700 ±0.06 2.666 ±0.06 2.217 ±0.04 11.389 ±0.09 2.227 ±0.01 3.368 ±0.01 0.389 ±0.00 0.439 ±0.00
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
show-version run-script
npm@9 29.712 ±2.15 13.201 ±0.01 12.676 ±0.17 13.581 ±0.07 2.391 ±0.01 2.401 ±0.03 2.168 ±0.01 8.605 ±0.14 2.041 ±0.03 2.867 ±0.01 0.360 ±0.00 0.411 ±0.00
#6576 27.817 ±0.61 13.459 ±0.12 13.173 ±0.02 14.103 ±0.04 2.443 ±0.00 2.465 ±0.00 2.317 ±0.04 9.049 ±0.10 2.161 ±0.03 2.925 ±0.03 0.392 ±0.00 0.445 ±0.01

@lukekarrys lukekarrys merged commit a39bd6a into latest Jun 21, 2023
@lukekarrys lukekarrys deleted the lk/flaky-windows-shim-tests branch June 21, 2023 00:52
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