Skip to content

Commit

Permalink
test: remove unnecessary timer
Browse files Browse the repository at this point in the history
The timer in NAPI's test_callback_scope/test-resolve-async.js
can be removed. If the test fails, it will timeout on its own.
The extra timer increases the chances of the test being
flaky.

PR-URL: nodejs#18719
Fixes: nodejs#18702
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cjihrig authored and Gabriel Schulhof committed Apr 16, 2018
1 parent 7996463 commit a12f442
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/addons-napi/test_callback_scope/test-resolve-async.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
'use strict';

const common = require('../../common');
const assert = require('assert');
const { testResolveAsync } = require(`./build/${common.buildType}/binding`);

let called = false;
testResolveAsync().then(common.mustCall(() => {
called = true;
}));

setTimeout(common.mustCall(() => { assert(called); }),
common.platformTimeout(20));
testResolveAsync().then(common.mustCall());

0 comments on commit a12f442

Please sign in to comment.