summaryrefslogtreecommitdiff
path: root/test/sequential/test-timers-block-eventloop.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-12-04 00:17:10 -0500
committercjihrig <cjihrig@gmail.com>2019-12-06 22:03:00 -0500
commitaa363c49eadabe45344986476b8388d66cfced37 (patch)
treeba53cfe2fefd9bf9cfbf5f505215b9f9bd1c410d /test/sequential/test-timers-block-eventloop.js
parentf446929923d6cfa471721404d9d7f806449d5fe6 (diff)
downloadandroid-node-v8-aa363c49eadabe45344986476b8388d66cfced37.tar.gz
android-node-v8-aa363c49eadabe45344986476b8388d66cfced37.tar.bz2
android-node-v8-aa363c49eadabe45344986476b8388d66cfced37.zip
test: remove common.busyLoop()
This commit replaces common.busyLoop() with sleep(). PR-URL: https://github.com/nodejs/node/pull/30787 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'test/sequential/test-timers-block-eventloop.js')
-rw-r--r--test/sequential/test-timers-block-eventloop.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sequential/test-timers-block-eventloop.js b/test/sequential/test-timers-block-eventloop.js
index 811216fcb2..6118695c92 100644
--- a/test/sequential/test-timers-block-eventloop.js
+++ b/test/sequential/test-timers-block-eventloop.js
@@ -1,7 +1,9 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
const assert = require('assert');
+const { sleep } = require('internal/util');
let called = false;
const t1 = setInterval(() => {
@@ -14,5 +16,5 @@ const t1 = setInterval(() => {
}, 10);
const t2 = setInterval(() => {
- common.busyLoop(20);
+ sleep(20);
}, 10);