diff --git a/test/parallel/test-timers-unrefd-interval-still-fires.js b/test/parallel/test-timers-unrefd-interval-still-fires.js index 8f26d28816..172da8bb95 100644 --- a/test/parallel/test-timers-unrefd-interval-still-fires.js +++ b/test/parallel/test-timers-unrefd-interval-still-fires.js @@ -5,7 +5,7 @@ const common = require('../common'); const TEST_DURATION = common.platformTimeout(100); -const N = 5; +const N = 3; var nbIntervalFired = 0; const keepOpen = setTimeout(() => { @@ -20,7 +20,7 @@ const timer = setInterval(() => { timer._onTimeout = () => { throw new Error('Unrefd interval fired after being cleared.'); }; - setImmediate(() => clearTimeout(keepOpen)); + clearTimeout(keepOpen); } }, 1);