Skip to content

Commit 3c7d7e0

Browse files
committed
Fix force-checkpointing-invoke test timeout by disabling retries
- Add retryPresets.noRetry to long-running step (20s sleep) - Prevents test timeout when step fails and retries with default strategy - Test was timing out at 30s due to retry delays on top of 20s sleep
1 parent 0d88f63 commit 3c7d7e0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/aws-durable-execution-sdk-js-examples/src/examples/force-checkpointing/invoke/force-checkpointing-invoke.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
withDurableExecution,
33
DurableContext,
4+
retryPresets,
45
} from "@aws/durable-execution-sdk-js";
56
import { ExampleConfig } from "../../../types";
67

@@ -18,10 +19,14 @@ export const handler = withDurableExecution(
1819
const results = await ctx.parallel([
1920
// Branch 1: Long-running operation that blocks termination
2021
async (branchCtx: DurableContext) => {
21-
return await branchCtx.step("long-running-step", async () => {
22-
await new Promise((resolve) => setTimeout(resolve, 20000));
23-
return "long-complete";
24-
});
22+
return await branchCtx.step(
23+
"long-running-step",
24+
async () => {
25+
await new Promise((resolve) => setTimeout(resolve, 20000));
26+
return "long-complete";
27+
},
28+
{ retryStrategy: retryPresets.noRetry },
29+
);
2530
},
2631
// Branch 2: Multiple sequential invokes that need force checkpoint
2732
async (branchCtx: DurableContext) => {

0 commit comments

Comments
 (0)