Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner: Fix mock timer issues #50384

Merged
merged 5 commits into from
Nov 12, 2023

Commits on Oct 25, 2023

  1. Configuration menu
    Copy the full SHA
    1a23be5 View commit details
    Browse the repository at this point in the history
  2. test_runner: fix tick processing terminating prematurely

    An incorrect early return caused processing of due timers to stop
    prematurely.
    
    Fixes: nodejs#50382
    mika-fischer committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    c087b39 View commit details
    Browse the repository at this point in the history
  3. test_runner: fix mocked setInterval using the wrong interval

    mocked setInterval used the wrong increment when scheduling the new
    timer.
    
    Fixes: nodejs#50382
    mika-fischer committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    73ec104 View commit details
    Browse the repository at this point in the history
  4. test_runner: fix incorrect cleanup of timers

    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 committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    22fbdd3 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Update test/parallel/test-runner-mock-timers.js

    Co-authored-by: Raz Luvaton <16746759+rluvaton@users.noreply.github.com>
    mika-fischer and rluvaton authored Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1f91c1f View commit details
    Browse the repository at this point in the history