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

Fix flaky test for `Project.onDidChangeFiles()` #19525

merged 8 commits into from Jun 14, 2019


None yet
2 participants
Copy link

commented Jun 13, 2019

Fixes #19507 by upgrading to atom/nsfw@1.0.25, which incorporates the fix introduced in atom/nsfw#9.

Note: In addition to fixing the underlying flakiness, this pull request also introduces a handful of improvements to the spec itself. Each commit in this pull request makes an isolated improvement described in the commit message.

jasonrudolph and others added some commits Jun 13, 2019

Update onDidChangeFiles spec to use real clock
Prior to this change, the spec was using the fake clock, which was
preventing the `setTimeout` from ever calling the `expire` function.

Co-Authored-By: Antonio Scandurra <>
Fix test initialization
If multiple specs were to populate the events var, one spec would 
pollute the others. So, let's reset the events var at the beginning of 
each spec.

Co-Authored-By: Antonio Scandurra <>
If spec succeeds, clear the timeout
Prior to this change, the `console.error` statement _always_ ran, 
regardless of whether the promise resolved successfully. With this 
change, we clear the timeout in the scenario where the promise resolves 

Co-Authored-By: Antonio Scandurra <>
Convert spec to use async/await
Co-Authored-By: Antonio Scandurra <>
Co-Authored-By: Antonio Scandurra <>

@jasonrudolph jasonrudolph requested review from nathansobo and rafeca Jun 13, 2019

@jasonrudolph jasonrudolph self-assigned this Jun 13, 2019

@jasonrudolph jasonrudolph force-pushed the as/jr/fix-flaky-project-spec branch from d992c2f to a0742f8 Jun 13, 2019

jasonrudolph added some commits Jun 14, 2019

Revert "Disable flaky spec on Windows until we can identify a proper …

This reverts commit a0742f8.

As of 8734f66, we're now using the nsfw fixes from
atom/nsfw#9, which should resolve the flakiness
we were seeing on Windows.

@jasonrudolph jasonrudolph changed the title "Quarantine" flaky test for `Project.onDidChangeFiles()` Fix flaky test for `Project.onDidChangeFiles()` Jun 14, 2019

@jasonrudolph jasonrudolph merged commit a71aca8 into master Jun 14, 2019

1 check passed

Atom Pull Requests #20190614.5 succeeded

@jasonrudolph jasonrudolph deleted the as/jr/fix-flaky-project-spec branch Jun 14, 2019

jasonrudolph added a commit that referenced this pull request Jun 14, 2019

Merge pull request #19525 from atom/as/jr/fix-flaky-project-spec
Fix flaky test for `Project.onDidChangeFiles()`

jasonrudolph added a commit that referenced this pull request Jun 14, 2019

Revert "add delay to watch-path tests to make them less flaky"
This reverts commit dd40782. With the upgrade to atom/nsfw v1.0.25 in
#19525, we should no longer  need the
delay introduced in dd40782.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.