Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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>
  • Loading branch information
devin-ai-integration[bot] and ericallam committed Apr 16, 2026
commit d00e5cab05acfee18b128118b718d74c5de4ba53
14 changes: 7 additions & 7 deletions internal-packages/run-engine/src/engine/tests/waitpoints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ describe("RunEngine Waitpoints", () => {
id: result.waitpoint.id,
});

await setTimeout(200);
await setTimeout(1_000);

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

await setTimeout(200);
await setTimeout(1_000);

const executionData2 = await engine.getRunExecutionData({ runId: run.id });
expect(executionData2?.snapshot.executionStatus).toBe("EXECUTING");
Expand Down Expand Up @@ -1050,7 +1050,7 @@ describe("RunEngine Waitpoints", () => {
environmentId: authenticatedEnvironment.id,
projectId: authenticatedEnvironment.projectId,
idempotencyKey,
idempotencyKeyExpiresAt: new Date(Date.now() + 200),
idempotencyKeyExpiresAt: new Date(Date.now() + 60_000),
});
expect(result.waitpoint.status).toBe("PENDING");
expect(result.waitpoint.idempotencyKey).toBe(idempotencyKey);
Expand All @@ -1060,7 +1060,7 @@ describe("RunEngine Waitpoints", () => {
environmentId: authenticatedEnvironment.id,
projectId: authenticatedEnvironment.projectId,
idempotencyKey,
idempotencyKeyExpiresAt: new Date(Date.now() + 200),
idempotencyKeyExpiresAt: new Date(Date.now() + 60_000),
});
expect(sameWaitpointResult.waitpoint.id).toBe(result.waitpoint.id);

Expand Down Expand Up @@ -1096,7 +1096,7 @@ describe("RunEngine Waitpoints", () => {
id: result.waitpoint.id,
});

await setTimeout(200);
await setTimeout(1_000);

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

// Wait for the waitpoint to complete and unblock (snapshot 3)
await setTimeout(200);
await setTimeout(500);
await engine.completeWaitpoint({ id: waitpoint.id });
await setTimeout(200);
await setTimeout(1_000);

// Get all snapshots for the run
const allSnapshots = await prisma.taskRunExecutionSnapshot.findMany({
Expand Down
Loading