Files
node/test/node-api
Christian Aurich 4c702e401b test: deflake node-api test-free-called
`node-api/test_worker_buffer_callback/test-free-called` checks that
`getFreeCallCount()` is 0 on a line that runs after `new Worker()`. The
worker thread can load the addon and run its finalizer before the main
thread reaches that line, in which case the counter is already 1 and the
assertion fails. The zero check is only a baseline, so it does not need
the worker to exist.

Move it above the worker creation. The equivalent test under
test/addons/worker-buffer-callback was changed the same way in
64f7d0e0bd.

Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65948
Refs: https://github.com/nodejs/node/pull/51013
Refs: https://github.com/nodejs/reliability/blob/e457f5b68957d1502256488977bc33b4346d8a4b/reports/2026-09-10.md
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-09-25 18:01:46 +02:00
..
2023-08-21 16:41:53 +00:00
2024-09-28 13:58:55 +00:00
2018-12-04 13:58:17 -08:00