@@ -351,7 +351,7 @@ var _ = Describe("Saturation Mode - Multiple VariantAutoscalings", Label("full")
351351 err = fixtures .EnsureModelService (ctx , k8sClient , cfg .LLMDNamespace , modelServiceB , poolB , cfg .ModelID , cfg .UseSimulator , cfg .MaxNumSeqs )
352352 Expect (err ).NotTo (HaveOccurred ())
353353
354- err = fixtures .EnsureService (ctx , k8sClient , cfg .LLMDNamespace , modelServiceB , modelServiceB + "-decode" , 8001 )
354+ err = fixtures .EnsureService (ctx , k8sClient , cfg .LLMDNamespace , modelServiceB , modelServiceB + "-decode" , 8000 )
355355 Expect (err ).NotTo (HaveOccurred ())
356356
357357 By ("Creating ServiceMonitor for service B" )
@@ -439,7 +439,7 @@ var _ = Describe("Saturation Mode - Multiple VariantAutoscalings", Label("full")
439439 err := fixtures .CreateLoadJob (ctx , k8sClient , cfg .LLMDNamespace , "multi-load-a" , targetA , loadCfg )
440440 Expect (err ).NotTo (HaveOccurred ())
441441
442- targetB := fmt .Sprintf ("http://%s-service:8001 " , modelServiceB )
442+ targetB := fmt .Sprintf ("http://%s-service:8000 " , modelServiceB )
443443 err = fixtures .CreateLoadJob (ctx , k8sClient , cfg .LLMDNamespace , "multi-load-b" , targetB , loadCfg )
444444 Expect (err ).NotTo (HaveOccurred ())
445445
@@ -468,8 +468,18 @@ var _ = Describe("Saturation Mode - Multiple VariantAutoscalings", Label("full")
468468 })
469469 })
470470
471- By ("Waiting for both VAs to detect saturation" )
472- time .Sleep (2 * time .Minute )
471+ By ("Waiting for both load jobs to complete" )
472+ Eventually (func (g Gomega ) {
473+ jobA , err := k8sClient .BatchV1 ().Jobs (cfg .LLMDNamespace ).Get (ctx , jobNameA , metav1.GetOptions {})
474+ g .Expect (err ).NotTo (HaveOccurred ())
475+ g .Expect (jobA .Status .Succeeded ).To (BeNumerically (">" , 0 ), "Job A should complete successfully" )
476+ }, 5 * time .Minute , 10 * time .Second ).Should (Succeed ())
477+
478+ Eventually (func (g Gomega ) {
479+ jobB , err := k8sClient .BatchV1 ().Jobs (cfg .LLMDNamespace ).Get (ctx , jobNameB , metav1.GetOptions {})
480+ g .Expect (err ).NotTo (HaveOccurred ())
481+ g .Expect (jobB .Status .Succeeded ).To (BeNumerically (">" , 0 ), "Job B should complete successfully" )
482+ }, 5 * time .Minute , 10 * time .Second ).Should (Succeed ())
473483
474484 By ("Verifying VA A (cheaper) scaled up more than VA B" )
475485 vaAObj := & variantautoscalingv1alpha1.VariantAutoscaling {}
0 commit comments