parallel.test-runner-watch-mode is flaky

Test

parallel.test-runner-watch-mode

Platform

Windows

Console output

not ok 751 parallel/test-runner-watch-mode # TODO : Fix flaky test
  ---
  duration_ms: 8645.08900
  severity: flaky
  exitcode: 1
  stack: |-
    TAP version 13
    # Subtest: test runner watch mode
        # Subtest: should run tests repeatedly
        ok 1 - should run tests repeatedly
          ---
          duration_ms: 2693.0066
          ...
        # Subtest: should run tests with dependency repeatedly
        ok 2 - should run tests with dependency repeatedly
          ---
          duration_ms: 1796.3552
          ...
        # Subtest: should run tests with ESM dependency
        ok 3 - should run tests with ESM dependency
          ---
          duration_ms: 1799.0633
          ...
        # Subtest: should support running tests without a file
        ok 4 - should support running tests without a file
          ---
          duration_ms: 1775.4925
          ...
        1..4
    ok 1 - test runner watch mode
      ---
      duration_ms: 8067.7592
      type: 'suite'
      ...
    1..1
    # tests 4
    # suites 1
    # pass 4
    # fail 0
    # cancelled 0
    # skipped 0
    # todo 0
    # duration_ms 8089.987
    Can't clean tmpdir: d:\workspace\node-test-binary-windows-js-suites\node\test\.tmp.647
    Files blocking: [ 'dependency.js', 'dependency.mjs', 'test.js' ]
    
    d:\workspace\node-test-binary-windows-js-suites\node\test\common\tmpdir.js:69
        throw e;
        ^
    
    Error: EBUSY: resource busy or locked, rmdir '\\?\d:\workspace\node-test-binary-windows-js-suites\node\test\.tmp.647'
        at rmdirSync (node:fs:1231:10)
        at _rmdirSync (node:internal/fs/rimraf:235:5)
        at rimrafSync (node:internal/fs/rimraf:193:7)
        at Object.rmSync (node:fs:1280:10)
        at rmSync (d:\workspace\node-test-binary-windows-js-suites\node\test\common\tmpdir.js:20:8)
        at onexit (d:\workspace\node-test-binary-windows-js-suites\node\test\common\tmpdir.js:54:5)
        at process.<anonymous> (d:\workspace\node-test-binary-windows-js-suites\node\test\common\tmpdir.js:43:14)
        at process.emit (node:events:527:35) {
      errno: -4082,
      syscall: 'rmdir',
      code: 'EBUSY',
      path: '\\\\?\\d:\\workspace\\node-test-binary-windows-js-suites\\node\\test\\.tmp.647'
    }
    
    Node.js v21.0.0-pre
  ...

Build links

Additional information

No response