Skip to content
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

test: run in both a child process and a worker thread #738

Closed

Conversation

gabrielschulhof
Copy link
Contributor

Re: #730
Signed-off-by: @gabrielschulhof

@gabrielschulhof
Copy link
Contributor Author

@anfilat I changed the way we run all tests to run on a worker thread as well as on the main process. I could not reproduce #730. Can you please test this code and tell me if I'm missing anything?

@legendecas
Copy link
Member

The CI failure might be related to nodejs/node#33508?

@anfilat
Copy link

anfilat commented May 27, 2020

@gabrielschulhof With my test I wanted to try use SetInstanceData/GetInstanceData in different threads at the same time. But the test was crashed by working different addons at same thread (addon_data and objectwrap). You new testrunner starts each addon at a new process.

@gabrielschulhof
Copy link
Contributor Author

@anfilat understood. In that case, that's probably a test case to add to Node.js.core.

@gabrielschulhof
Copy link
Contributor Author

@legendecas I had to fix the threadsafe_function_sum test because it was quitting before the promise was resolved. Can you please take another look?

@gabrielschulhof gabrielschulhof force-pushed the run-tests-in-workers2 branch from 82bfab0 to 25b5985 Compare June 2, 2020 19:36
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson mhdawson removed request for NickNaso and KevinEady June 9, 2020 23:40
@mhdawson
Copy link
Member

mhdawson commented Jun 9, 2020

This needs nodejs/node#33508 to be backported to 14.x and 12.x before it can land.

@gabrielschulhof
Copy link
Contributor Author

gabrielschulhof commented Jul 22, 2020

Gabriel Schulhof added 3 commits July 22, 2020 12:09
Re: nodejs#730
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
The TSFN sum test was not waiting for all TSFN calls to complete before
releasing the TSFN completely. The main thread must only release the
TSFN and resolve the deferred if all calls have completed.
@gabrielschulhof gabrielschulhof force-pushed the run-tests-in-workers2 branch from 25b5985 to 16cc763 Compare July 22, 2020 19:11
@gabrielschulhof
Copy link
Contributor Author

Rebased.

@gabrielschulhof
Copy link
Contributor Author

gabrielschulhof commented Jul 22, 2020

@legendecas
Copy link
Member

@mhdawson: This needs nodejs/node#33508 to be backported to 14.x and 12.x before it can land.

nodejs/node#33508 has been backported to 14.5.0 and 12.18.3. @gabrielschulhof is there any other blocking issue for this one?

}

testModules.forEach((name) => {
runOneChild(name, 'child');
Copy link
Member

Choose a reason for hiding this comment

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

I'd worried that all the cases were started at the same time. Can we wait for one case to finish then start another one?

Base automatically changed from master to main January 26, 2021 22:43
@gabrielschulhof gabrielschulhof deleted the run-tests-in-workers2 branch February 1, 2021 16:39
@gabrielschulhof gabrielschulhof restored the run-tests-in-workers2 branch February 1, 2021 16:41
@mhdawson
Copy link
Member

mhdawson commented Feb 1, 2021

@gabrielschulhof did you mean to close this?

@mhdawson mhdawson reopened this Feb 1, 2021
@gabrielschulhof gabrielschulhof deleted the run-tests-in-workers2 branch March 7, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants