Skip to content

Commit b07889f

Browse files
committed
test(webapp): isolate redis for streamBatchItems to fix 30s seal-timeout flake
1 parent a0c5c6f commit b07889f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ 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-
import { containerTest } from "@internal/testcontainers";
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.
23+
import { containerTestWithIsolatedRedis as containerTest } from "@internal/testcontainers";
2024
import { trace } from "@opentelemetry/api";
2125
import { PrismaClient } from "@trigger.dev/database";
2226
import { BatchId } from "@trigger.dev/core/v3/isomorphic";

test-timings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"apps/webapp/test/workerQueueSplit.test.ts": 3,
7575
"apps/webapp/test/components/DateTime.test.ts": 24,
7676
"apps/webapp/test/engine/batchPayloads.test.ts": 5018,
77-
"apps/webapp/test/engine/streamBatchItems.test.ts": 27262,
77+
"apps/webapp/test/engine/streamBatchItems.test.ts": 47000,
7878
"apps/webapp/test/engine/taskIdentifierRegistry.test.ts": 13152,
7979
"apps/webapp/test/engine/triggerTask.test.ts": 31630,
8080
"apps/webapp/test/presenters/mapRunToLiveFields.test.ts": 3,

0 commit comments

Comments
 (0)