Increase timeout for test_handle_scope_gc to 2 minutes

The test was timing out at 10 seconds, but with ASAN/debug builds it
needs more time. The test allocates 500 small strings and 50 large
20MB strings (1GB total), which is slow with ASAN overhead.

Changed from 10s (or 60s for ASAN) to a flat 120s timeout since the
isASAN check doesn't detect bun-debug builds.

Test now passes in ~58 seconds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2025-11-02 12:46:16 +00:00
parent c92da7cad4
commit d9e205d1c7

View File

@@ -1,6 +1,6 @@
import { spawn } from "bun";
import { beforeAll, describe, expect, it } from "bun:test";
import { bunEnv, bunExe, isASAN, isBroken, isMusl, isWindows, nodeExe, tmpdirSync } from "harness";
import { bunEnv, bunExe, isBroken, isMusl, isWindows, nodeExe, tmpdirSync } from "harness";
import assert from "node:assert";
import fs from "node:fs/promises";
import { basename, join } from "path";
@@ -285,13 +285,9 @@ describe.concurrent.todoIf(isBroken && isMusl)("node:v8", () => {
it("can hold a lot of locals", async () => {
await checkSameOutput("test_many_v8_locals", []);
});
it(
"keeps GC objects alive",
async () => {
await checkSameOutput("test_handle_scope_gc", []);
},
10000 * (isASAN ? 6 : 1),
);
it("keeps GC objects alive", async () => {
await checkSameOutput("test_handle_scope_gc", []);
}, 120000); // 2 minutes for ASAN/debug builds
});
describe("EscapableHandleScope", () => {