diff --git a/workflow/controller/workflowpod_test.go b/workflow/controller/workflowpod_test.go index 4cdcbc75bb4e..73a3bbea9932 100644 --- a/workflow/controller/workflowpod_test.go +++ b/workflow/controller/workflowpod_test.go @@ -1637,6 +1637,8 @@ func TestPodExists(t *testing.T) { assert.NoError(t, err) assert.Len(t, pods.Items, 1) + // Sleep 1 second to wait for informer getting pod info + time.Sleep(time.Second) existingPod, doesExist, err := woc.podExists(pod.ObjectMeta.Name) assert.NoError(t, err) assert.NotNil(t, existingPod)