Skip to content

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

Closed
@bnoordhuis

Description

@bnoordhuis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.macosIssues and PRs related to the macOS platform / OSX.testIssues and PRs related to the tests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions