diff options
author | cjihrig <cjihrig@gmail.com> | 2018-02-11 17:07:39 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-02-14 10:24:51 -0500 |
commit | 755e07cb738558841880e32795b6f1df4005c5b9 (patch) | |
tree | 802632cc023c4090f8d16e2082070a699b789240 | |
parent | f1fc426cce9db230cb83866871f355afa0b92d3b (diff) | |
download | android-node-v8-755e07cb738558841880e32795b6f1df4005c5b9.tar.gz android-node-v8-755e07cb738558841880e32795b6f1df4005c5b9.tar.bz2 android-node-v8-755e07cb738558841880e32795b6f1df4005c5b9.zip |
test: remove unnecessary timer
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: https://github.com/nodejs/node/pull/18719
Fixes: https://github.com/nodejs/node/issues/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>
-rw-r--r-- | test/addons-napi/test_callback_scope/test-resolve-async.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/test/addons-napi/test_callback_scope/test-resolve-async.js b/test/addons-napi/test_callback_scope/test-resolve-async.js index e9f4b9044c..77f25c9dde 100644 --- a/test/addons-napi/test_callback_scope/test-resolve-async.js +++ b/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()); |