@@ -120,49 +120,6 @@ var _ = FullVpaE2eDescribe("Pods under VPA", func() {
120120 })
121121})
122122
123- var _ = FullVpaE2eDescribe ("OOMing pods under VPA" , func () {
124- var (
125- vpaClientSet * vpa_clientset.Clientset
126- vpaCRD * vpa_types.VerticalPodAutoscaler
127- )
128- const replicas = 3
129-
130- f := framework .NewDefaultFramework ("vertical-pod-autoscaling" )
131-
132- ginkgo .BeforeEach (func () {
133- ns := f .Namespace .Name
134- ginkgo .By ("Setting up a hamster deployment" )
135-
136- runOomingReplicationController (
137- f .ClientSet ,
138- ns ,
139- "hamster" ,
140- replicas )
141- ginkgo .By ("Setting up a VPA CRD" )
142- config , err := framework .LoadConfig ()
143- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
144-
145- vpaCRD = NewVPA (f , "hamster-vpa" , & autoscaling.CrossVersionObjectReference {
146- APIVersion : "apps/v1" ,
147- Kind : "Deployment" ,
148- Name : "hamster" ,
149- })
150-
151- vpaClientSet = vpa_clientset .NewForConfigOrDie (config )
152- vpaClient := vpaClientSet .AutoscalingV1beta2 ()
153- _ , err = vpaClient .VerticalPodAutoscalers (ns ).Create (vpaCRD )
154- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
155- })
156-
157- ginkgo .It ("have memory requests growing with OOMs" , func () {
158- listOptions := metav1.ListOptions {LabelSelector : "name=hamster" , FieldSelector : getPodSelectorExcludingDonePodsOrDie ()}
159- err := waitForResourceRequestInRangeInPods (
160- f , listOptions , apiv1 .ResourceMemory ,
161- ParseQuantityOrDie ("1400Mi" ), ParseQuantityOrDie ("10000Mi" ))
162- gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
163- })
164- })
165-
166123func waitForPodsMatch (f * framework.Framework , listOptions metav1.ListOptions , matcher func (pod apiv1.Pod ) bool ) error {
167124 return wait .PollImmediate (pollInterval , pollTimeout , func () (bool , error ) {
168125
@@ -178,17 +135,12 @@ func waitForPodsMatch(f *framework.Framework, listOptions metav1.ListOptions, ma
178135 return false , nil
179136 }
180137
181- // Run matcher on all pods, even if we find pod that doesn't match early.
182- // This allows the matcher to write logs for all pods. This in turns makes
183- // it easier to spot some problems (for example unexpected pods in the list
184- // results).
185- result := true
186138 for _ , pod := range podList .Items {
187139 if ! matcher (pod ) {
188- result = false
140+ return false , nil
189141 }
190142 }
191- return result , nil
143+ return true , nil
192144
193145 })
194146}
0 commit comments