Skip to content

Commit a4673d8

Browse files
committed
retry retrieve wf too
1 parent a1238dc commit a4673d8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dbos/queues_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,12 +1080,11 @@ func TestQueueTimeouts(t *testing.T) {
10801080
assert.Equal(t, WorkflowStatusCancelled, status.Status, "expected enqueued detached workflow status to be WorkflowStatusCancelled")
10811081

10821082
// Check the child's status: should be success because it is detached
1083-
childID := fmt.Sprintf("%s-child", handle.GetWorkflowID())
1084-
childHandle, err := RetrieveWorkflow[string](dbosCtx, childID)
1085-
require.NoError(t, err, "failed to retrieve detached workflow")
1086-
1087-
// Wait for the child workflow status to become success
10881083
require.Eventually(t, func() bool {
1084+
childID := fmt.Sprintf("%s-child", handle.GetWorkflowID())
1085+
childHandle, err := RetrieveWorkflow[string](dbosCtx, childID)
1086+
require.NoError(t, err, "failed to retrieve detached workflow")
1087+
10891088
status, err := childHandle.GetStatus()
10901089
if err != nil {
10911090
return false

0 commit comments

Comments
 (0)