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.

Backport-PR-URL: #19447
PR-URL: #18719
Fixes: #18702
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Apr 16, 2018
1 parent 8826f18 commit 7c58045
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
@@ -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 7c58045

Please sign in to comment.