Skip to content

Commit c99b5a2

Browse files
committed
Check error from gomega
Signed-off-by: James Sturtevant <[email protected]>
1 parent 49e8c19 commit c99b5a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/e2e/framework/autoscaling/autoscaling_utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,18 @@ func (rc *ResourceConsumer) WaitForReplicas(ctx context.Context, desiredReplicas
507507
// EnsureDesiredReplicasInRange ensure the replicas is in a desired range
508508
func (rc *ResourceConsumer) EnsureDesiredReplicasInRange(ctx context.Context, minDesiredReplicas, maxDesiredReplicas int, duration time.Duration, hpaName string) {
509509
interval := 10 * time.Second
510-
framework.Gomega().Consistently(ctx, func(ctx context.Context) int {
510+
desiredReplicasErr := framework.Gomega().Consistently(ctx, func(ctx context.Context) int {
511511
return rc.GetReplicas(ctx)
512512
}).WithTimeout(duration).WithPolling(interval).Should(gomega.And(gomega.BeNumerically(">=", minDesiredReplicas), gomega.BeNumerically("<=", maxDesiredReplicas)))
513513

514+
// dump HPA for debugging
514515
as, err := rc.GetHpa(ctx, hpaName)
515516
if err != nil {
516517
framework.Logf("Error getting HPA: %s", err)
517518
} else {
518519
framework.Logf("HPA status: %+v", as.Status)
519520
}
521+
framework.ExpectNoError(desiredReplicasErr)
520522
}
521523

522524
// Pause stops background goroutines responsible for consuming resources.

0 commit comments

Comments
 (0)