File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
pkg/scheduler/cache/status_updater Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,18 @@ var _ = Describe("Status Updater Concurrency - large scale: increase queue size"
150150 close (finishUpdatesChan )
151151 wg .Wait ()
152152
153- podGroupsList , _ := kubeAiSchedClient .SchedulingV2alpha2 ().PodGroups ("default" ).List (context .TODO (), metav1.ListOptions {})
154- podGroupsFromCluster := make ([]* schedulingv2alpha2.PodGroup , 0 , len (podGroupsList .Items ))
155- for _ , podGroup := range podGroupsList .Items {
156- podGroupsFromCluster = append (podGroupsFromCluster , podGroup .DeepCopy ())
157- }
153+ var podGroupsFromCluster []* schedulingv2alpha2.PodGroup
154+ Eventually (func () bool {
155+ podGroupsList , _ := kubeAiSchedClient .SchedulingV2alpha2 ().PodGroups ("default" ).List (context .TODO (), metav1.ListOptions {})
156+ podGroupsFromCluster = make ([]* schedulingv2alpha2.PodGroup , 0 , len (podGroupsList .Items ))
157+ for _ , podGroup := range podGroupsList .Items {
158+ if len (podGroup .Status .Conditions ) == 0 {
159+ return false
160+ }
161+ podGroupsFromCluster = append (podGroupsFromCluster , podGroup .DeepCopy ())
162+ }
163+ return true
164+ }).WithTimeout (10 * time .Second ).Should (BeTrue ())
158165
159166 statusUpdater .SyncPodGroupsWithPendingUpdates (podGroupsFromCluster )
160167
You can’t perform that action at this time.
0 commit comments