mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
### What does this PR do? We should not call .deinit() after .toJS otherwise hasPendingActivity will access invalid memory ### How did you verify your code works? Test run it with debug build on macos or asan on and will catch it --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
20 lines
397 B
TypeScript
20 lines
397 B
TypeScript
setTimeout(() => {
|
|
// no need to wait we know at this point that the test passed
|
|
process.exit(0);
|
|
}, 100);
|
|
for (let i = 0; i < 3; i++) {
|
|
try {
|
|
const sql = new Bun.SQL({
|
|
url: "postgres://-invalid-:1234/postgres",
|
|
max: 1,
|
|
idleTimeout: 1,
|
|
connectionTimeout: 1,
|
|
maxLifetime: 1,
|
|
});
|
|
await sql.connect();
|
|
} catch {
|
|
} finally {
|
|
Bun.gc(true);
|
|
}
|
|
}
|