★ wanayoo — archive 1999 https://github.com/nodejs/node-addon-api/pull/807Nouvelle recherche | Portail wanayoo
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: fixed the execution for the threadsfafe function test. #807

Closed
wants to merge 1 commit into from
Closed

test: fixed the execution for the threadsfafe function test. #807

wants to merge 1 commit into from

Conversation

Copy link
Member

@NickNaso NickNaso commented Sep 3, 2020

Fixes: #806

@NickNaso NickNaso mentioned this pull request Sep 4, 2020
6 tasks
@mhdawson
Copy link
Member

@mhdawson mhdawson commented Sep 4, 2020

Can you add a bit more detail on what you saw in terms of it not running?

When I run the tests before apply the patch I see:

Running test 'threadsafe_function/threadsafe_function_ctx'
Running test 'threadsafe_function/threadsafe_function_existing_tsfn'
Running test 'threadsafe_function/threadsafe_function_ptr'
Running test 'threadsafe_function/threadsafe_function_sum'
Running test 'threadsafe_function/threadsafe_function_unref'
Running test 'threadsafe_function/threadsafe_function'

@NickNaso
Copy link
Member Author

@NickNaso NickNaso commented Sep 4, 2020

Hi @mhdawson,
what you see printed on the console is in https://github.com/nodejs/node-addon-api/blob/master/test/index.js#L106 but this does not mean that the corresponding test is executed. In the test for threadsafe function https://github.com/nodejs/node-addon-api/blob/master/test/threadsafe_function/threadsafe_function.js#L7 we are exporting only the function instead we should export a a function invocation. Trying to insert a console.log('...') like reported below:

module.exports = async function() {
  console.log('Execution of test for threadsafe function');
  await test(require(`../build/${buildType}/binding.node`));
  await test(require(`../build/${buildType}/binding_noexcept.node`));
};

you could see that the test will not be executed. This happened in the PR #787.

@mhdawson
Copy link
Member

@mhdawson mhdawson commented Sep 4, 2020

@NickNaso thanks for the clarification.

Copy link
Member

@mhdawson mhdawson left a comment

LGTM

mhdawson added a commit that referenced this issue Sep 4, 2020
test: fixed the execution for the threasfafe function test

PR-URL: #807
Fixes: #806
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
-sh-4.2$
@mhdawson
Copy link
Member

@mhdawson mhdawson commented Sep 4, 2020

Landed as a13b36c

@mhdawson mhdawson closed this Sep 4, 2020
Superlokkus added a commit to Superlokkus/node-addon-api that referenced this issue Nov 20, 2020
test: fixed the execution for the threasfafe function test

PR-URL: nodejs#807
Fixes: nodejs#806
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
-sh-4.2$
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.

2 participants