Commit 88ba17b
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
64f7d0e.
Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com>
PR-URL: #65948
Refs: #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>1 parent 07fcf1e commit 88ba17b
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
0 commit comments