Skip to content

test: fix flaky test-fs-promises-file-handle-close#31687

Closed
addaleax wants to merge 2 commits intonodejs:masterfrom
addaleax:fix-test-fs-promises-file-handle-close
Closed

test: fix flaky test-fs-promises-file-handle-close#31687
addaleax wants to merge 2 commits intonodejs:masterfrom
addaleax:fix-test-fs-promises-file-handle-close

Conversation

@addaleax
Copy link
Copy Markdown
Member

@addaleax addaleax commented Feb 7, 2020

Sometimes, the expected warnings were not emitted.
To harden the test:

  • Instead of relying on a timeout that raced against the file being
    opened, wait until the file is opened and then schedule GC
    after that.
  • Explicitly keep the event loop alive for one turn to make sure
    the warning is being seen.

Example failure: https://ci.nodejs.org/job/node-test-commit-linux-containered/17920/nodes=ubuntu1804_sharedlibs_debug_x64/testReport/junit/(root)/test/parallel_test_fs_promises_file_handle_close/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Sometimes, the expected warnings were not emitted.
To harden the test:

- Instead of relying on a timeout that raced against the file being
  opened, wait until the file is opened and then schedule GC
  after that.
- Explicitly keep the event loop alive for one turn to make sure
  the warning is being seen.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 7, 2020
@addaleax addaleax added flaky-test Issues and PRs related to the tests with unstable failures on the CI. fs Issues and PRs related to the fs subsystem / file system. labels Feb 7, 2020
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented Feb 7, 2020

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 8, 2020
@addaleax
Copy link
Copy Markdown
Member Author

Landed in 5100e84

@addaleax addaleax closed this Feb 10, 2020
addaleax added a commit that referenced this pull request Feb 10, 2020
Sometimes, the expected warnings were not emitted.
To harden the test:

- Instead of relying on a timeout that raced against the file being
  opened, wait until the file is opened and then schedule GC
  after that.
- Explicitly keep the event loop alive for one turn to make sure
  the warning is being seen.

PR-URL: #31687
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@addaleax addaleax deleted the fix-test-fs-promises-file-handle-close branch February 10, 2020 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. flaky-test Issues and PRs related to the tests with unstable failures on the CI. fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants