Skip to content

test: reduce the allocation size in test-worker-arraybuffer-zerofill

Test has been flaky with timeouts in CI. This is possibly due to the repeated large allocations on the main thread. This commit reduces the allocation size and makes a number of other cleanups. The main goal is to hopefully make this test more reliable / not-flaky.

Also move the test to sequential. The frequent large allocations could be causing the test to be flaky if run parallel to other tests.

Refs: https://github.com/nodejs/node/issues/52274

update: I realized after that it wasn't clear what was meant by "reduce the allocation size" here. The actual allocation on each iteration remains the same, but by waiting to start allocating until the worker reports the "online" event we reduce (albeit slightly) the number of allocations that are done overall. In local testing this reduced the actually number of allocation calls by a fair amount, reducing the amount of memory the test was using. Unfortunately I don't think just doing that is enough to moving the test to sequential should hopefully also help.

Merge request reports

Loading