Skip to content

investigate flaky test-fs-watch-file-enoent-after-deletion #21692

Closed

Description

@Trott
  • Version: 11.0.0-pre (master)
  • Platform: win10 vs2017
  • Subsystem: test

https://ci.nodejs.org/job/node-test-binary-windows/18408/COMPILED_BY=vs2017,RUNNER=win10,RUN_SUBSET=3/console

13:48:22 not ok 561 sequential/test-fs-watch-file-enoent-after-deletion
13:48:22   ---
13:48:22   duration_ms: 0.668
13:48:22   severity: fail
13:48:22   exitcode: 1
13:48:22   stack: |-
13:48:22     assert.js:80
13:48:22       throw new AssertionError(obj);
13:48:22       ^
13:48:22     
13:48:22     AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B:
13:48:22     + expected - actual
13:48:22     
13:48:22     - 0
13:48:22     + 1
13:48:22         at StatWatcher.<anonymous> (c:\workspace\node-test-binary-windows\test\sequential\test-fs-watch-file-enoent-after-deletion.js:46:10)
13:48:22         at StatWatcher.<anonymous> (c:\workspace\node-test-binary-windows\test\common\index.js:467:15)
13:48:22         at StatWatcher.emit (events.js:182:13)
13:48:22         at StatWatcher.onchange (internal/fs/watchers.js:47:8)
13:48:22   ...

Activity

  1. added
    fsIssues and PRs related to file-system APIs and the fs module.
    windowsIssues and PRs related to the Windows platform.
    flaky-testIssues and PRs involving tests that fail intermittently in CI.
    on Jul 6, 2018
  2. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    Looks to be a race condition between watchFile() and setTimeout().

  3. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    Reproducible if you put the call to watchFile() in a timer such that it gets executed after setTimeout().

  4. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    (fs.watchfile() is synchronous, but probably the underlying operating system watch stuff it depends on is not?)

  5. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    @nodejs/platform-windows @nodejs/fs @nodejs/testing

  6. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    This has, unsurprisingly, come up before:

    f1c890afb05
    #13800 especially #13800 (comment)
    #14010

  7. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    OK, now I think I have a fix...

  8. Trott commented on Jul 6, 2018

    @Trott
    MemberAuthor

    Hopeful fix: #21694

  9. added a commit that references this issue on Jul 14, 2018
  10. added a commit that references this issue on Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky-testIssues and PRs involving tests that fail intermittently in CI.fsIssues and PRs related to file-system APIs and the fs module.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions