◐ Shell
clean mode source ↗

test: fix flaky test-performance-eventloopdelay by mcollina · Pull Request #61629 · nodejs/node

The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450

@nodejs-github-bot added needs-ci

PRs that need a full CI run.

test

Issues and PRs related to the tests.

labels

Feb 1, 2026

legendecas

@mcollina mcollina added author ready

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

and removed needs-ci

PRs that need a full CI run.

labels

Feb 4, 2026

aduh95 pushed a commit that referenced this pull request

Feb 8, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

aduh95 pushed a commit that referenced this pull request

Feb 10, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Feb 11, 2026

aduh95 pushed a commit that referenced this pull request

Feb 14, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

aduh95 pushed a commit that referenced this pull request

Feb 22, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 2, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 3, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>

marco-ippolito pushed a commit that referenced this pull request

Mar 4, 2026
The test was flaky because the histogram sampling might not have
completed before the assertions ran. By using setImmediate before
disabling the histogram and checking values, we give the event loop
a chance to record final samples on slower systems.

Also added an explicit check for histogram.count > 0 to provide a
clearer error message if no samples are recorded.

Refs: nodejs/reliability#1450
PR-URL: #61629
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>