Skip to content

Commit eb291e5

Browse files
committed
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
1 parent db1e36b commit eb291e5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎test/ffi/test-ffi-fast-buffer.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ test('optimized pointer arguments reject direct SharedArrayBuffers', () => {
9595

9696
assert.throws(() => callFirstByte(shared), expected);
9797
} finally {
98+
eval('%WaitForBackgroundOptimization()');
9899
lib.close();
99100
}
100101
});
@@ -202,6 +203,7 @@ test('optimized buffer signatures preserve pointer-like conversions', () => {
202203
}
203204
}
204205
} finally {
206+
eval('%WaitForBackgroundOptimization()');
205207
lib.close();
206208
}
207209
});
@@ -235,6 +237,7 @@ test('multi-argument buffer signatures accept pointer BigInts', () => {
235237
assert.strictEqual(functions.sum_buffer(pointer, length), 28n);
236238
}
237239
} finally {
240+
eval('%WaitForBackgroundOptimization()');
238241
lib.close();
239242
}
240243
});

0 commit comments

Comments
 (0)