File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -194,11 +194,20 @@ var _ = SIGDescribe("PullImages", func() {
194
194
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
195
195
196
196
ginkgo .By ("Check imagepulljob should be cleaned" )
197
+ time .Sleep (3 * time .Second )
197
198
gomega .Eventually (func () bool {
198
- imagePullJobs , err := testerForImagePullJob .ListJobs (job .Namespace )
199
+ imagePullJobLister , err := testerForImagePullJob .ListJobs (job .Namespace )
199
200
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
200
- return len (imagePullJobs .Items ) > 0
201
- }, 3 * time .Second , time .Second ).Should (gomega .Equal (false ))
201
+ var imagePullJobs []* appsv1alpha1.ImagePullJob
202
+ for i := range imagePullJobLister .Items {
203
+ pullJob := & imagePullJobLister .Items [i ]
204
+ if metav1 .IsControlledBy (pullJob , job ) {
205
+ imagePullJobs = append (imagePullJobs , pullJob )
206
+ }
207
+ fmt .Printf ("waiting imagePullJob GC: %v" , imagePullJobs )
208
+ }
209
+ return len (imagePullJobs ) == 0
210
+ }, time .Minute , time .Second ).Should (gomega .BeTrue ())
202
211
})
203
212
204
213
framework .ConformanceIt ("create an always job to pull an image on all nodes" , func () {
You can’t perform that action at this time.
0 commit comments