You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The recovered workflow should proceed quickly since it already completed the sleep
1821
+
receiveIdempotencyStartEvent.Wait()
1822
+
1823
+
// Verify that the recovery was fast (no additional 3-second sleep)
1824
+
secondElapsed:=time.Since(startTime)
1825
+
additionalTime:=secondElapsed-elapsed
1826
+
require.Less(t, additionalTime, 500*time.Millisecond, "expected recovery to be fast (additional time less than 500ms), but additional time was %v", additionalTime)
1827
+
1828
+
// Complete the workflow
1829
+
receiveIdempotencyStopEvent.Set()
1830
+
1831
+
// Get results from both handles - they should be the same (empty string due to timeout)
1832
+
result1, err:=handle1.GetResult()
1833
+
require.NoError(t, err, "failed to get result from first workflow")
1834
+
require.Equal(t, "", result1, "expected empty result from first workflow due to timeout")
1835
+
1836
+
result2, err:=recoveredHandles[0].GetResult()
1837
+
require.NoError(t, err, "failed to get result from recovered workflow")
1838
+
require.Equal(t, result1, result2, "expected both workflow results to be the same")
1839
+
1840
+
// Verify that there are exactly 2 steps: recv and sleep
1841
+
steps, err:=GetWorkflowSteps(dbosCtx, workflowID)
1842
+
require.NoError(t, err, "failed to get workflow steps")
0 commit comments