From eb291e5efd2dbfc6209c8c69d9aed9410f640c92 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sat, 26 Sep 2026 21:32:16 +0200 Subject: [PATCH] test: deflake fast FFI buffer tests The optimized buffer tests can leave compiler jobs running during library teardown. Wait for those jobs before closing the libraries, matching the existing integer validation tests. Signed-off-by: Filip Skokan Assisted-by: Codex --- test/ffi/test-ffi-fast-buffer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ffi/test-ffi-fast-buffer.js b/test/ffi/test-ffi-fast-buffer.js index 0358b4f33c29..edf4a297aa49 100644 --- a/test/ffi/test-ffi-fast-buffer.js +++ b/test/ffi/test-ffi-fast-buffer.js @@ -95,6 +95,7 @@ test('optimized pointer arguments reject direct SharedArrayBuffers', () => { assert.throws(() => callFirstByte(shared), expected); } finally { + eval('%WaitForBackgroundOptimization()'); lib.close(); } }); @@ -202,6 +203,7 @@ test('optimized buffer signatures preserve pointer-like conversions', () => { } } } finally { + eval('%WaitForBackgroundOptimization()'); lib.close(); } }); @@ -235,6 +237,7 @@ test('multi-argument buffer signatures accept pointer BigInts', () => { assert.strictEqual(functions.sum_buffer(pointer, length), 28n); } } finally { + eval('%WaitForBackgroundOptimization()'); lib.close(); } });