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: #18719
Fixes: #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 committed Feb 14, 2018
1 parent f1fc426 commit 755e07c
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 755e07c

Please sign in to comment.