Skip to content

Commit

Permalink
fix(controller): TestPodExists unit test, add delay to wait for infor…
Browse files Browse the repository at this point in the history
…mer getting pod info (#6783)

Signed-off-by: Tianchu Zhao <evantczhao@gmail.com>
  • Loading branch information
tczhao committed Sep 22, 2021
1 parent 2c81aaa commit 954292d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions workflow/controller/workflowpod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 954292d

Please sign in to comment.