wait for pod to be ready before continuing with the test

This test is flaky. I have noticed that this happens because the pod is not READY when it is being deleted at the end of the test. This fix ensures that the pod is READY before continuing with the rest of the test.
This commit is contained in:
Anish Shah 2024-07-12 09:23:32 -07:00
parent bae59799e9
commit 665df5794e

View File

@ -90,7 +90,7 @@ func makePodToVerifyPids(baseName string, pidsLimit resource.Quantity) *v1.Pod {
func runPodPidsLimitTests(f *framework.Framework) {
ginkgo.It("should set pids.max for Pod", func(ctx context.Context) {
ginkgo.By("by creating a G pod")
pod := e2epod.NewPodClient(f).Create(ctx, &v1.Pod{
pod := e2epod.NewPodClient(f).CreateSync(ctx, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "pod" + string(uuid.NewUUID()),
Namespace: f.Namespace.Name,