@@ -69,7 +69,7 @@ func createPluginAndVerifyExistence(f *framework.Framework, ctx context.Context,
6969 }
7070
7171 ginkgo .By ("checking if the resource is allocatable" )
72- if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , v1 .ResourceName (baseResource ), 30 * time .Second , utils .WaitOpGreater ); err != nil {
72+ if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , v1 .ResourceName (baseResource ), 30 * time .Second , utils .WaitForPositiveResource ); err != nil {
7373 framework .Failf ("unable to wait for nodes to have positive allocatable resource: %v" , err )
7474 }
7575}
@@ -104,8 +104,10 @@ func describe() {
104104
105105 e2ekubectl .RunKubectlOrDie (f .Namespace .Name , "delete" , "-k" , filepath .Dir (vanillaPath ))
106106
107+ framework .Logf ("Waiting for i915 resources to go to zero" )
108+
107109 // Wait for resources to go to zero
108- if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/i915" , 30 * time .Second , utils .WaitOpZero ); err != nil {
110+ if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/i915" , 30 * time .Second , utils .WaitForZeroResource ); err != nil {
109111 framework .Failf ("unable to wait for nodes to have no resources: %v" , err )
110112 }
111113 })
@@ -186,7 +188,7 @@ func describe() {
186188 createPluginAndVerifyExistence (f , ctx , monitoringPath , "gpu.intel.com/i915" )
187189
188190 ginkgo .By ("checking if the monitoring resource is allocatable" )
189- if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/i915_monitoring" , 30 * time .Second , utils .WaitOpGreater ); err != nil {
191+ if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/i915_monitoring" , 30 * time .Second , utils .WaitForPositiveResource ); err != nil {
190192 framework .Failf ("unable to wait for nodes to have positive allocatable resource: %v" , err )
191193 }
192194 })
@@ -202,12 +204,12 @@ func describe() {
202204 e2ekubectl .RunKubectlOrDie ("node-feature-discovery" , "rollout" , "restart" , "daemonset" , "nfd-worker" )
203205
204206 ginkgo .By ("checking if the millicores resource is allocatable" )
205- if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/millicores" , 30 * time .Second , utils .WaitOpGreater ); err != nil {
207+ if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/millicores" , 30 * time .Second , utils .WaitForPositiveResource ); err != nil {
206208 framework .Failf ("unable to wait for nodes to have positive allocatable resource: %v" , err )
207209 }
208210
209211 ginkgo .By ("checking if the tiles resource is allocatable" )
210- if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/tiles" , 30 * time .Second , utils .WaitOpGreater ); err != nil {
212+ if err := utils .WaitForNodesWithResource (ctx , f .ClientSet , "gpu.intel.com/tiles" , 30 * time .Second , utils .WaitForPositiveResource ); err != nil {
211213 framework .Failf ("unable to wait for nodes to have positive allocatable resource: %v" , err )
212214 }
213215 })
0 commit comments