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

darwin,test: flaky test sequential/test-fs-watch #8045

Closed
bnoordhuis opened this issue Aug 10, 2016 · 1 comment
Closed

darwin,test: flaky test sequential/test-fs-watch #8045

bnoordhuis opened this issue Aug 10, 2016 · 1 comment
Labels
fs Issues and PRs related to the fs subsystem / file system. macos Issues and PRs related to the macOS platform / OSX. test Issues and PRs related to the tests.

Comments

@bnoordhuis
Copy link
Member

bnoordhuis commented Aug 10, 2016

Version: HEAD of master (at commit 4c62892)
Platform: Darwin hermes.local 12.6.0 Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 2015; root:xnu-2050.48.19~1/RELEASE_X86_64 x86_64
Subsystem: fs, fsevents

sequential/test-fs-watch persistently fails when run in close proximity to parallel/test-fs-watch-recursive because it picks up an event that was generated by the other test.

Standalone:

$ python tools/test.py sequential/test-fs-watch
[00:00|% 100|+   1|-   0]: Done

In sequence:

$ python tools/test.py parallel/test-fs-watch-recursive sequential/test-fs-watch
=== release test-fs-watch ===                              
Path: sequential/test-fs-watch
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: 'newfile.txt' == 'watch.txt'
    at FSWatcher.<anonymous> (/Users/bnoordhuis/src/v1.x/test/sequential/test-fs-watch.js:89:18)
    at emitTwo (events.js:106:13)
    at FSWatcher.emit (events.js:191:7)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1412:12)
Command: out/Release/node /Users/bnoordhuis/src/v1.x/test/sequential/test-fs-watch.js
[00:00|% 100|+   1|-   1]: Done

Also happens with the tests flipped:

$ python tools/test.py sequential/test-fs-watch parallel/test-fs-watch-recursive
=== release test-fs-watch ===                              
Path: sequential/test-fs-watch
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: 'newfile.txt' == 'watch.txt'
    at FSWatcher.<anonymous> (/Users/bnoordhuis/src/v1.x/test/sequential/test-fs-watch.js:89:18)
    at emitTwo (events.js:106:13)
    at FSWatcher.emit (events.js:191:7)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1412:12)
Command: out/Release/node /Users/bnoordhuis/src/v1.x/test/sequential/test-fs-watch.js
[00:00|% 100|+   1|-   1]: Done

Dropping in another test makes the problem go away again:

$ python tools/test.py parallel/test-fs-watch-recursive parallel/test-fs-watch-encoding sequential/test-fs-watch
[00:00|% 100|+   3|-   0]: Done

I didn't test on Windows, the other platform that supports recursive file watching.

@bnoordhuis bnoordhuis added test Issues and PRs related to the tests. macos Issues and PRs related to the macOS platform / OSX. labels Aug 10, 2016
@mscdex mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Aug 10, 2016
@Trott
Copy link
Member

Trott commented Aug 10, 2016

@nodejs/testing

I think this one has been an entry in my mind's "oh that pops up from time to time on my local machine, fortunately not in CI though so I'm going to ignore it entirely" .ignore file....

santigimeno added a commit to santigimeno/node that referenced this issue Aug 16, 2016
`test-fs-watch-recursive` and `test-fs-watch` were both watching the
same folder: `tmp/testsubdir` so running them sequentially on `OS X`
could make `test-fs-watch` to fail due to events generated in the other
test. Make them watch a random directory to fix the issue.

Fixes: nodejs#8045
evanlucas pushed a commit that referenced this issue Aug 24, 2016
`test-fs-watch-recursive` and `test-fs-watch` were both watching the
same folder: `tmp/testsubdir` so running them sequentially on `OS X`
could make `test-fs-watch` to fail due to events generated in the other
test. Make them watch a random directory to fix the issue.

Fixes: #8045
PR-URL: #8115
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. macos Issues and PRs related to the macOS platform / OSX. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants