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

test: terminate WPT workers after test completion by targos · Pull Request #37627 · nodejs/node · GitHub

/ node Public

test: terminate WPT workers after test completion - #37627

Closed
targos wants to merge 1 commit into
nodejs:masterfrom
targos:wpt-worker
Closed

test: terminate WPT workers after test completion#37627
targos wants to merge 1 commit into
nodejs:masterfrom
targos:wpt-worker

Conversation

targos commented Mar 6, 2021

Copy link
Copy Markdown
Member

No description provided.

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Mar 6, 2021
Comment thread test/common/wpt.js
this.inProgress.delete(filename);
// Always force termination of the worker. Some tests allocate resources
// that would otherwise keep it alive.
this.workers.get(filename).terminate();

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

If it's safe to ignore the Promise status, maybe add an empty catch handler?

Suggested change
this.workers.get(filename).terminate();
this.workers.get(filename).terminate().catch(() => {});

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

This promise can never reject

node/lib/internal/worker.js

Lines 344 to 354 in f3d3769

if (this[kHandle] === null) return PromiseResolve();
this[kHandle].stopThread();
// Do not use events.once() here, because the 'exit' event will always be
// emitted regardless of any errors, and the point is to only resolve
// once the thread has actually stopped.
return new Promise((resolve) => {
this.once('exit', resolve);
});
}

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

targos added a commit that referenced this pull request Mar 8, 2021
PR-URL: #37627
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

targos commented Mar 8, 2021

Copy link
Copy Markdown
Member Author

Landed in bba5aac

targos closed this Mar 8, 2021
targos deleted the wpt-worker branch March 8, 2021 20:57
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
PR-URL: #37627
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
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

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL