Skip to content

Commit f85d6a3

Browse files
fix(openworkflow): stop backend eagerly in fan-out failure test
Move backend.stop() into the test body where it benefits from the full test timeout, instead of relying on the afterEach hook which has a shorter 10s hookTimeout. The fan-out test spawns 300 child workflows and in-flight queries need time to drain when the parent fails early. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 75cc669 commit f85d6a3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/openworkflow/worker/execution.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,11 @@ describe("StepExecutor", () => {
20682068
run.parentStepAttemptId !== null,
20692069
);
20702070
expect(childRuns).toHaveLength(300);
2071+
2072+
// Stop backend eagerly within the test body (which has a longer timeout
2073+
// than the afterEach hook) so in-flight child workflow queries can drain.
2074+
backendsToStop.splice(backendsToStop.indexOf(backend), 1);
2075+
await backend.stop();
20712076
});
20722077

20732078
test("completes when child 150 has transient failure handled by child-level retries", async () => {

0 commit comments

Comments
 (0)