fix(workflow-engines): race condition when retry interval is used (#11771)

This commit is contained in:
Adrien de Peretti
2025-03-12 13:53:34 +01:00
committed by GitHub
parent c97eaa0e0d
commit 72d2cf9207
24 changed files with 1130 additions and 235 deletions
@@ -8,7 +8,7 @@ import { setTimeout } from "timers/promises"
const step_1 = createStep(
"step_1",
jest.fn(async (input) => {
await setTimeout(200)
await setTimeout(1000)
return new StepResponse(input, { compensate: 123 })
})
@@ -42,6 +42,8 @@ createWorkflow(
createWorkflow(
{
name: "workflow_step_timeout_async",
idempotent: true,
retentionTime: 5,
},
function (input) {
const resp = step_1_async(input)
@@ -33,6 +33,8 @@ createWorkflow(
{
name: "workflow_transaction_timeout_async",
timeout: 0.1, // 0.1 second
idempotent: true,
retentionTime: 5,
},
function (input) {
const resp = step_1(input).config({