Skip to content

Commit d00e5ca

Browse files
fix: increase waitpoint test timeouts for PrismaPg adapter overhead
With Prisma 7's PrismaPg driver adapter, each query goes through the pg Pool + adapter layer, adding ~5-10ms overhead per query vs the old in-process Rust engine. The continueRunIfUnblocked worker job executes 5+ DB queries, so the previous 200ms window was too tight for CI runners. - Increase setTimeout from 200ms to 1000ms for all completeWaitpoint -> continueRunIfUnblocked wait patterns - Increase idempotencyKeyExpiresAt from 200ms to 60s to prevent expiry during test execution - Increase getSnapshotsSince pre-complete wait from 200ms to 500ms Co-Authored-By: Eric Allam <eallam@icloud.com>
1 parent 47cba16 commit d00e5ca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

internal-packages/run-engine/src/engine/tests/waitpoints.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ describe("RunEngine Waitpoints", () => {
379379
id: result.waitpoint.id,
380380
});
381381

382-
await setTimeout(200);
382+
await setTimeout(1_000);
383383

384384
assertNonNullable(event);
385385
const notificationEvent = event as EventBusEventArgs<"workerNotification">[0];
@@ -936,7 +936,7 @@ describe("RunEngine Waitpoints", () => {
936936
id: result.waitpoint.id,
937937
});
938938

939-
await setTimeout(200);
939+
await setTimeout(1_000);
940940

941941
const executionData2 = await engine.getRunExecutionData({ runId: run.id });
942942
expect(executionData2?.snapshot.executionStatus).toBe("EXECUTING");
@@ -1050,7 +1050,7 @@ describe("RunEngine Waitpoints", () => {
10501050
environmentId: authenticatedEnvironment.id,
10511051
projectId: authenticatedEnvironment.projectId,
10521052
idempotencyKey,
1053-
idempotencyKeyExpiresAt: new Date(Date.now() + 200),
1053+
idempotencyKeyExpiresAt: new Date(Date.now() + 60_000),
10541054
});
10551055
expect(result.waitpoint.status).toBe("PENDING");
10561056
expect(result.waitpoint.idempotencyKey).toBe(idempotencyKey);
@@ -1060,7 +1060,7 @@ describe("RunEngine Waitpoints", () => {
10601060
environmentId: authenticatedEnvironment.id,
10611061
projectId: authenticatedEnvironment.projectId,
10621062
idempotencyKey,
1063-
idempotencyKeyExpiresAt: new Date(Date.now() + 200),
1063+
idempotencyKeyExpiresAt: new Date(Date.now() + 60_000),
10641064
});
10651065
expect(sameWaitpointResult.waitpoint.id).toBe(result.waitpoint.id);
10661066

@@ -1096,7 +1096,7 @@ describe("RunEngine Waitpoints", () => {
10961096
id: result.waitpoint.id,
10971097
});
10981098

1099-
await setTimeout(200);
1099+
await setTimeout(1_000);
11001100

11011101
const executionData2 = await engine.getRunExecutionData({ runId: run.id });
11021102
expect(executionData2?.snapshot.executionStatus).toBe("EXECUTING");
@@ -1212,9 +1212,9 @@ describe("RunEngine Waitpoints", () => {
12121212
});
12131213

12141214
// Wait for the waitpoint to complete and unblock (snapshot 3)
1215-
await setTimeout(200);
1215+
await setTimeout(500);
12161216
await engine.completeWaitpoint({ id: waitpoint.id });
1217-
await setTimeout(200);
1217+
await setTimeout(1_000);
12181218

12191219
// Get all snapshots for the run
12201220
const allSnapshots = await prisma.taskRunExecutionSnapshot.findMany({

0 commit comments

Comments
 (0)