Skip to content

Commit 2869f6a

Browse files
committed
test(testcontainers): give the N-shard fixture test a container-boot timeout
1 parent 433dbac commit 2869f6a

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

internal-packages/testcontainers/src/nShardFixture.test.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@ import { makeNShardRunOpsPostgresTest } from "./index.js";
33

44
const nShardTest = makeNShardRunOpsPostgresTest(2);
55

6+
// Booting the PG14 + PG17 containers and cloning four databases on a cold runner far exceeds
7+
// vitest's 5s default (this package sets no global testTimeout), so pass a generous per-test one.
68
nShardTest(
79
"builds 4 distinct databases (legacy + new + 2 gen-2 shards)",
810
async ({ legacyUri, newUri, shardUris }) => {
911
expect(shardUris).toHaveLength(2);
1012
const all = [legacyUri, newUri, ...shardUris];
1113
expect(new Set(all).size).toBe(4);
12-
}
14+
},
15+
120_000
1316
);
1417

15-
nShardTest("each gen-2 clone carries the run-ops subset schema", async ({ shardPrismas }) => {
16-
expect(shardPrismas).toHaveLength(2);
17-
for (const prisma of shardPrismas) {
18-
await expect(prisma.taskRun.count()).resolves.toBe(0);
19-
}
20-
});
18+
nShardTest(
19+
"each gen-2 clone carries the run-ops subset schema",
20+
async ({ shardPrismas }) => {
21+
expect(shardPrismas).toHaveLength(2);
22+
for (const prisma of shardPrismas) {
23+
await expect(prisma.taskRun.count()).resolves.toBe(0);
24+
}
25+
},
26+
120_000
27+
);

0 commit comments

Comments
 (0)