From ecd727e4c75c96fc61027fab3d356bb43bb2ce2b Mon Sep 17 00:00:00 2001 From: Kevin Hannon Date: Tue, 27 Jun 2023 08:50:29 -0400 Subject: [PATCH] Fix PodGC test when PodDisruptionConditions disabled (#118805) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test comment should match the code in podgc * Update test/integration/podgc/podgc_test.go Co-authored-by: Michał Woźniak * test comment should match the code in podgc --------- Co-authored-by: Michał Woźniak --- test/integration/podgc/podgc_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/podgc/podgc_test.go b/test/integration/podgc/podgc_test.go index 58798943c06..76ca9b9ed73 100644 --- a/test/integration/podgc/podgc_test.go +++ b/test/integration/podgc/podgc_test.go @@ -159,8 +159,8 @@ func TestTerminatingOnOutOfServiceNode(t *testing.T) { withFinalizer: true, wantPhase: v1.PodFailed, }, - "pod has phase when PodDisruptionConditions disabled": { - enablePodDisruptionConditions: true, + "pod has phase unchanged when PodDisruptionConditions disabled": { + enablePodDisruptionConditions: false, withFinalizer: true, wantPhase: v1.PodPending, }, @@ -244,7 +244,7 @@ func TestTerminatingOnOutOfServiceNode(t *testing.T) { } if test.withFinalizer { // wait until the pod phase is set as expected - err = wait.PollImmediate(time.Second, time.Second*15, func() (bool, error) { + err = wait.Poll(time.Second, time.Second*15, func() (bool, error) { var e error pod, e = cs.CoreV1().Pods(pod.Namespace).Get(testCtx.Ctx, pod.Name, metav1.GetOptions{}) if e != nil {