FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix flaky addons/callback-scope/test-resolve-async by addaleax · Pull Request #22664 · nodejs/node · GitHub

/ node Public

test: fix flaky addons/callback-scope/test-resolve-async - #22664

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:test-resolve-async
Closed

test: fix flaky addons/callback-scope/test-resolve-async#22664
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:test-resolve-async

Conversation

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member

Example failure: https://ci.nodejs.org/job/node-test-commit-linux/21264/nodes=fedora-latest-x64/console

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

nodejs-github-bot added addons Issues and PRs related to native addons. test Issues and PRs related to the tests. labels Sep 2, 2018

Copy link
Copy Markdown
Collaborator

addaleax added flaky-test Issues and PRs related to the tests with unstable failures on the CI. fast-track PRs that do not need to wait for 48 hours to land. labels Sep 2, 2018

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/16968/

Feel free to 👍 this comment if you approve of fast-tracking.

lundibundi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Whoever lands this please also add
Fixes: https://github.com/nodejs/node/issues/22668.

addaleax commented Sep 3, 2018
edited
Loading

Copy link
Copy Markdown
Member Author

Okay, loosened the test a bit more here.

New CI: https://ci.nodejs.org/job/node-test-pull-request/16987/ (:heavy_check_mark:)

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Sep 5, 2018
testResolveAsync().then(() => { called = true; });

setTimeout(() => { assert(called); }, common.platformTimeout(50));
process.on('beforeExit', () => { assert(called); });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why not use common.mustCall? It uses essentially the same mechanism

node/test/common/index.js

Lines 428 to 429 in b85baf7

// add the exit listener only once to avoid listener leak warnings
if (mustCallChecks.length === 0) process.on('exit', runCallChecks);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The goal is to have no MakeCallback() calls coming from Node.js before the check is run, since those would also run the microtask queue. process.on('exit') would be too late for that, process.on('beforeExit') should be okay.

danbev commented Sep 7, 2018

Copy link
Copy Markdown
Contributor

Landed in 4a5886c.

danbev closed this Sep 7, 2018
danbev pushed a commit that referenced this pull request Sep 7, 2018
Fixes: #22668
PR-URL: #22664
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Sep 7, 2018
Fixes: #22668
PR-URL: #22664
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addons Issues and PRs related to native addons. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. flaky-test Issues and PRs related to the tests with unstable failures on the CI. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL