Skip to content

Commit 9c4acb8

Browse files
committed
test(webapp): trim verbose comments in streamBatchItems fix
1 parent 19119bf commit 9c4acb8

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

apps/webapp/test/engine/streamBatchItems.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ vi.mock("~/services/platform.v3.server", async (importOriginal) => {
1616

1717
import { RunEngine } from "@internal/run-engine";
1818
import { setupAuthenticatedEnvironment } from "@internal/run-engine/tests";
19-
// Per-test redis (isolated): each test spins up its own RunEngine and runs batch work, which leaves
20-
// background activity on redis that outlives the test - sharing a worker redis across the 16 cases
21-
// here caused cross-test interference and 30s seal-timeout flakes. Same carve-out as the run-engine
22-
// batch tests. The NoClickhouse variant skips the worker-scoped ClickHouse boot+migrate (these tests
23-
// never touch ClickHouse), which the cold-start test would otherwise pay inside its test timeout.
19+
// Per-test redis isolation: each test runs its own RunEngine whose background work outlives the test
20+
// body. NoClickhouse because this suite never touches ClickHouse - skips the worker-scoped boot+migrate.
2421
import { containerTestWithIsolatedRedisNoClickhouse as containerTest } from "@internal/testcontainers";
2522
import { trace } from "@opentelemetry/api";
2623
import { PrismaClient } from "@trigger.dev/database";
@@ -34,11 +31,8 @@ import {
3431
} from "../../app/runEngine/services/streamBatchItems.server";
3532
import { ServiceValidationError } from "../../app/v3/services/baseService.server";
3633

37-
// 120s (not 30s): each of the 16 cases here boots its own per-test Redis container and spins up a
38-
// full RunEngine, and a cold container boot counts against the test's own timeout. Under CI Docker
39-
// contention that boot can take tens of seconds, so 30s was too tight and the flake landed on
40-
// whichever test happened to boot while Docker was busiest. 120s matches the run-engine package
41-
// convention for tests of this footprint (RunEngine + per-test container).
34+
// 120s: a cold per-test container boot counts against the test's own timeout, and under CI Docker
35+
// contention 30s was too tight. Matches the run-engine convention for this footprint.
4236
vi.setConfig({ testTimeout: 120_000 });
4337

4438
describe("StreamBatchItemsService", () => {

internal-packages/testcontainers/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,8 @@ type ContainerWithIsolatedRedisNoClickhouseContext = {
544544
redisOptions: RedisOptions;
545545
};
546546

547-
// Postgres (template-clone) + per-test Redis, and NOTHING else. Same Redis isolation as
548-
// containerTestWithIsolatedRedis (for background work that outlives the test body) but without the
549-
// worker-scoped ClickHouse boot+migrate that the `resetClickhouse` auto fixture would otherwise force
550-
// on the first test in the file. Use this for tests that touch Postgres + Redis but never ClickHouse -
551-
// it removes the heaviest item from the cold-start container budget.
547+
// Like containerTestWithIsolatedRedis (template-clone Postgres + per-test Redis) but with no
548+
// ClickHouse - for suites that touch Postgres + Redis but never ClickHouse, avoiding its boot+migrate.
552549
export const containerTestWithIsolatedRedisNoClickhouse =
553550
test.extend<ContainerWithIsolatedRedisNoClickhouseContext>({
554551
network,

0 commit comments

Comments
 (0)