Commit 58821eed266 for nodejs
commit 58821eed266493dc987bd5dbecd0989cbd7f407a
Author: Filip Skokan <panva.ip@gmail.com>
Date: Mon Sep 28 21:47:03 2026 +0200
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 <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66327
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/test/ffi/test-ffi-fast-buffer.js b/test/ffi/test-ffi-fast-buffer.js
index 0358b4f33c2..edf4a297aa4 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();
}
});