Skip to content

Commit 58821ee

Browse files
authored
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: #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>
1 parent e6d4720 commit 58821ee

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)