test: avoid timer race in event loop delay test · nodejs/node@24a76e1 · GitHub
Skip to content

Commit 24a76e1

Browse files
trivikraduh95
authored andcommitted
test: avoid timer race in event loop delay test
An expired timer can run before the first complete event loop iteration, disabling the histogram before it records any samples. Drive a known number of iterations with setImmediate before checking the histograms, and share the chain between resolution variants. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #64728 Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20test-performance-eventloopdelay Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1 parent 3da555a commit 24a76e1

1 file changed

Lines changed: 38 additions & 47 deletions

File tree

test/sequential/test-performance-eventloopdelay.js

Lines changed: 38 additions & 47 deletions

0 commit comments

Comments
 (0)