Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Feat/fix periodic test breakage #113

Conversation

KevinDanikowski
Copy link

issue with periodic test failure was due to folders being deleted containing the same name tmp from the two different test files. I solved it by using a random int in the name for the folder creation.

@jamesxliu
Copy link

Interesting, so this makes me wonder if the introduction of nyc changed the timing of the afterEach/afterAll hooks containing rimraf cbs clearing the tmpdirs

@jamesxliu
Copy link

jamesxliu commented Nov 27, 2019

The tests aren't breaking on the master branch right? Just breaking in the other pull request branch. That branch introduces nyc into the test runner mix.

@KevinDanikowski
Copy link
Author

@jamesxliu it breaks on master. it only works periodically. i don't believe it has to do with nyc but perhaps it could.

@jamesxliu
Copy link

jamesxliu commented Nov 27, 2019

Whoah, haven't run into that. Pretty hilarious though, I pulled down the branch to reproduce the issue, tests pass, I switch to the fix/codeCoverage branch and kablammo, build failures in /tmp

@developher-net
Copy link
Owner

developher-net commented Nov 28, 2019

It happens for me when I switch branches even without NYC involved. Perhaps running ‘npm install’ in tmp is doing something that conflicts with node_modules in the parent folder. But I have no explanation why that would have worked fine in the past.

Copy link
Owner

@developher-net developher-net left a comment

Choose a reason for hiding this comment

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

Even if this doesn't fix the issue, this is a change that I wanted to implement to reduce the chance of issues caused by collisions between test runs. Exactly the approach I intended to implement. Thanks for tackling this!

@developher-net
Copy link
Owner

🎉 This issue has been resolved in version 3.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants