Skip to content

Commit 91fbfcd

Browse files
Address copilot feedback
1 parent 0da640e commit 91fbfcd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/openworkflow/backend.testsuite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ export function testBackend(options: TestBackendOptions): void {
919919
const updated =
920920
await backend.rescheduleWorkflowRunAfterFailedStepAttempt({
921921
workflowRunId: claimed.id,
922-
workerId: claimed.workerId ?? "",
922+
workerId: claimed.workerId!, // eslint-disable-line @typescript-eslint/no-non-null-assertion
923923
error,
924924
availableAt,
925925
});

packages/openworkflow/execution.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,21 +610,24 @@ function sleep(ms: number): Promise<void> {
610610
function createMockStepAttempt(
611611
overrides: Partial<StepAttempt> = {},
612612
): StepAttempt {
613+
const status = overrides.status ?? "completed";
614+
613615
return {
614616
namespaceId: "default",
615617
id: "step-attempt-id",
616618
workflowRunId: "workflow-run-id",
617619
stepName: "step",
618620
kind: "function",
619-
status: "completed",
621+
status,
620622
config: {},
621623
context: null,
622624
output: null,
623625
error: null,
624626
childWorkflowRunNamespaceId: null,
625627
childWorkflowRunId: null,
626628
startedAt: new Date("2026-01-01T00:00:00.000Z"),
627-
finishedAt: new Date("2026-01-01T00:00:01.000Z"),
629+
finishedAt:
630+
status === "running" ? null : new Date("2026-01-01T00:00:01.000Z"),
628631
createdAt: new Date("2026-01-01T00:00:00.000Z"),
629632
updatedAt: new Date("2026-01-01T00:00:01.000Z"),
630633
...overrides,

0 commit comments

Comments
 (0)