test_runner: Fix mock timer issues by mika-fischer · Pull Request #50384 · nodejs/node

added 4 commits

October 25, 2023 12:12
An incorrect early return caused processing of due timers to stop
prematurely.

Fixes: nodejs#50382
mocked setInterval used the wrong increment when scheduling the new
timer.

Fixes: nodejs#50382
Removal of mocket timers from the priority queue was broken. It used the
timerId instead of the position in the queue as index. This lead to
removal of incorrect timers from the queue causing timers not to be
scheduled at all.

Also, aborts caused removal from the queue even when the timer was
already triggered, and thus no longer present in the queue.

Fixes: nodejs#50365

@mika-fischer mika-fischer changed the title Fix mock timer issues test_runner: Fix mock timer issues

Oct 25, 2023

benjamingr

atlowChemi

@atlowChemi atlowChemi added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

request-ci

Add this label to start a Jenkins CI on a PR.

labels

Oct 26, 2023

rluvaton

@mika-fischer @rluvaton

Co-authored-by: Raz Luvaton <16746759+rluvaton@users.noreply.github.com>

anonrig

This was referenced

Nov 1, 2023

This was referenced

Nov 3, 2023

@atlowChemi atlowChemi added commit-queue

Add this label to land a pull request using GitHub Actions.

commit-queue-squash

Add this label to instruct the Commit Queue to squash all the PR commits into the first one.

and removed commit-queue-failed

An error occurred while landing this pull request using GitHub Actions.

labels

Nov 12, 2023

targos pushed a commit that referenced this pull request

Nov 23, 2023
PR-URL: #50384
Fixes: #50365
Fixes: #50381
Fixes: #50382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>

UlisesGascon pushed a commit that referenced this pull request

Dec 11, 2023
PR-URL: #50384
Fixes: #50365
Fixes: #50381
Fixes: #50382
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>