Skip to content

Commit 4fcc2c1

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: run all of test-timers-blocking-callback
The test has two test cases, but only the first was being run due to a small bug. This change fixes the bug. PR-URL: #9305 Reviewed-By: Julien Gilli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 5eeac8c commit 4fcc2c1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-timers-blocking-callback.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ function blockingCallback(callback) {
5656
common.busyLoop(TIMEOUT);
5757

5858
timeCallbackScheduled = Timer.now();
59-
setTimeout(blockingCallback, TIMEOUT);
59+
setTimeout(blockingCallback.bind(null, callback), TIMEOUT);
6060
}
6161
}
6262

63-
function testAddingTimerToEmptyTimersList(callback) {
63+
const testAddingTimerToEmptyTimersList = common.mustCall(function(callback) {
6464
initTest();
6565
// Call setTimeout just once to make sure the timers list is
6666
// empty when blockingCallback is called.
6767
setTimeout(blockingCallback.bind(null, callback), TIMEOUT);
68-
}
68+
});
6969

70-
function testAddingTimerToNonEmptyTimersList() {
70+
const testAddingTimerToNonEmptyTimersList = common.mustCall(function() {
7171
initTest();
7272
// Call setTimeout twice with the same timeout to make
7373
// sure the timers list is not empty when blockingCallback is called.
7474
setTimeout(blockingCallback, TIMEOUT);
7575
setTimeout(blockingCallback, TIMEOUT);
76-
}
76+
});
7777

7878
// Run the test for the empty timers list case, and then for the non-empty
7979
// timers list one

0 commit comments

Comments
 (0)