-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(node:worker_threads): fix several worker threads tests #19191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 nit, otherwise LGTM as long as none of the new tests are flaky
const worker_execArgv = ["--no-warnings", "--no-deprecation", "--tls-min-v1.2"]; | ||
const original_argv = [...process.argv]; | ||
const original_execArgv = [...process.execArgv]; | ||
const worker = new wt.Worker(new URL("fixtures/worker-fixture-argv.js", import.meta.url), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use fixtureURL
argv: [original_argv[0], original_argv[1].replace(import.meta.file, "worker-fixture-argv.js"), ...worker_argv], | ||
argv: [ | ||
original_argv[0], | ||
original_argv[1].replace(import.meta.file, "fixtures/worker-fixture-argv.js"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs backslash on Windows
expect(result).toEqual({ | ||
argv: [ | ||
original_argv[0], | ||
original_argv[1].replace(import.meta.file, "fixtures/worker-fixture-argv.js"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs backslash on Windows
@@ -0,0 +1,30 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flaky. delete it
@@ -0,0 +1,11 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flaky. delete it
@@ -0,0 +1,16 @@ | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flaky. delete it
What does this PR do?
Gets a few worker threads tests passing.
How did you verify your code works?
node tests + tests I've added