Skip to content

Commit f50120f

Browse files
committed
wait for wf to be created too
1 parent 1128e16 commit f50120f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dbos/queues_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,12 +1038,11 @@ func TestQueueTimeouts(t *testing.T) {
10381038
require.NoError(t, err, "failed to get workflow status")
10391039
assert.Equal(t, WorkflowStatusCancelled, status.Status, "expected workflow status to be WorkflowStatusCancelled")
10401040

1041-
// Check the child's status: should be cancelled too
1042-
childHandle, err := RetrieveWorkflow[string](dbosCtx, childWorkflowID)
1043-
require.NoError(t, err, "failed to retrieve child workflow")
1044-
10451041
// Wait for the child workflow status to become cancelled
10461042
require.Eventually(t, func() bool {
1043+
childHandle, err := RetrieveWorkflow[string](dbosCtx, childWorkflowID)
1044+
require.NoError(t, err, "failed to retrieve child workflow")
1045+
10471046
status, err := childHandle.GetStatus()
10481047
if err != nil {
10491048
return false

0 commit comments

Comments
 (0)