node/test/addons/worker-buffer-callback
Jithil P Ponnan 64f7d0e0bd
test: fix flakiness in worker*.test-free-called
The issue arises from the `getFreeCallCount()` function yielding the
initial value of 0. Upon instantiation of the `Worker` object, it
increments to 1. In the case of this flaky test, if the creation of the
`Worker` object is faster, the subsequent `getFreeCallCount()` call
always returns 1 instead of the expected 0.

Fixes: https://github.com/nodejs/node/issues/51003
PR-URL: https://github.com/nodejs/node/pull/51013
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-12-19 17:11:27 +00:00
..
binding.cc src,doc,test: remove String::New default parameter 2020-07-14 15:13:34 +02:00
binding.gyp src: mark ArrayBuffers with free callbacks as untransferable 2019-11-19 14:01:32 +01:00
test-free-called.js test: fix flakiness in worker*.test-free-called 2023-12-19 17:11:27 +00:00
test.js src: throw DataCloneError on transfering untransferable objects 2023-05-05 11:22:42 +00:00