Skip to content

Commit

Permalink
[YUNIKORN-2160] Fix Pod state in UserGroupLimit e2e test (apache#729)
Browse files Browse the repository at this point in the history
Closes: apache#729

Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
chenyulin0719 authored and FrankYang0529 committed Nov 19, 2023
1 parent fa8cab0 commit 8a0d449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e/user_group_limit/user_group_limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ func deploySleepPod(usergroup *si.UserGroupInformation, queuePath string, expect
gomega.Ω(err).NotTo(gomega.HaveOccurred())
} else {
ginkgo.By(fmt.Sprintf("The sleep pod %s can't be scheduled %s", sleepPod.Name, reason))
err = kClient.WaitForPodUnschedulable(sleepPod, 60*time.Second)
// Since Pending is the initial state of PodPhase, sleep for 5 seconds, then check whether the pod is still in Pending state.
time.Sleep(5 * time.Second)
err = kClient.WaitForPodPending(sleepPod.Namespace, sleepPod.Name, 60*time.Second)
gomega.Ω(err).NotTo(gomega.HaveOccurred())
}
return sleepPod
Expand Down

0 comments on commit 8a0d449

Please sign in to comment.