@@ -46,6 +46,8 @@ func scaleDeployment(objects []string, increment int) {
4646
4747// getModelServerPods Returns the list of Prefill and Decode vLLM pods separately
4848func getModelServerPods (podLabels , prefillLabels , decodeLabels map [string ]string ) ([]string , []string ) {
49+ ginkgo .By ("Getting Model server pods" )
50+
4951 pods := getPods (podLabels )
5052
5153 prefillValidator , err := apilabels .ValidatedSelectorFromSet (prefillLabels )
@@ -98,17 +100,22 @@ func getPods(labels map[string]string) []corev1.Pod {
98100}
99101
100102func podsInDeploymentsReady (objects []string ) {
101- var deployment appsv1. Deployment
102- helper := func ( deploymentName string ) bool {
103+ isDeploymentReady := func ( deploymentName string ) bool {
104+ var deployment appsv1. Deployment
103105 err := testConfig .K8sClient .Get (testConfig .Context , types.NamespacedName {Namespace : nsName , Name : deploymentName }, & deployment )
106+ ginkgo .By (fmt .Sprintf ("Waiting for deployment %q to be ready (err: %v): replicas=%#v, status=%#v" , deploymentName , err , * deployment .Spec .Replicas , deployment .Status ))
104107 return err == nil && * deployment .Spec .Replicas == deployment .Status .Replicas &&
105108 deployment .Status .Replicas == deployment .Status .ReadyReplicas
106109 }
110+
107111 for _ , kindAndName := range objects {
108112 split := strings .Split (kindAndName , "/" )
109113 if strings .ToLower (split [0 ]) == deploymentKind {
110- ginkgo .By (fmt .Sprintf ("Waiting for pods of %s to be ready" , split [1 ]))
111- gomega .Eventually (helper , readyTimeout , interval ).WithArguments (split [1 ]).Should (gomega .BeTrue ())
114+ gomega .Eventually (isDeploymentReady ).
115+ WithArguments (split [1 ]).
116+ WithPolling (interval ).
117+ WithTimeout (readyTimeout ).
118+ Should (gomega .BeTrue ())
112119 }
113120 }
114121}
0 commit comments