From dc641b12c047b626490d48c16eb45ef47dac151c Mon Sep 17 00:00:00 2001 From: Pardhu Konakanchi Date: Tue, 8 Jul 2025 11:30:02 -0400 Subject: [PATCH] add checks for ejections_unenforced in test --- xds/internal/balancer/outlierdetection/balancer_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xds/internal/balancer/outlierdetection/balancer_test.go b/xds/internal/balancer/outlierdetection/balancer_test.go index 163c126ec..fc81a7f4b 100644 --- a/xds/internal/balancer/outlierdetection/balancer_test.go +++ b/xds/internal/balancer/outlierdetection/balancer_test.go @@ -1175,6 +1175,9 @@ func (s) TestEjectUnejectSuccessRate(t *testing.T) { if got, _ := tmr.Metric("grpc.lb.outlier_detection.ejections_enforced"); got != 0 { t.Errorf("Metric grpc.lb.outlier_detection.ejections_enforced: got %v, want 0", got) } + if got, _ := tmr.Metric("grpc.lb.outlier_detection.ejections_unenforced"); got != 0 { + t.Errorf("Metric grpc.lb.outlier_detection.ejections_unenforced: got %v, want 0", got) + } // Since no addresses are ejected, a SubConn update should forward down // to the child. @@ -1244,6 +1247,9 @@ func (s) TestEjectUnejectSuccessRate(t *testing.T) { if got, _ := tmr.Metric("grpc.lb.outlier_detection.ejections_enforced"); got != 1 { t.Errorf("Metric grpc.lb.outlier_detection.ejections_enforced: got %v, want 1", got) } + if got, _ := tmr.Metric("grpc.lb.outlier_detection.ejections_unenforced"); got != 0 { + t.Errorf("Metric grpc.lb.outlier_detection.ejections_unenforced: got %v, want 0", got) + } // Now that an address is ejected, SubConn updates for SubConns using // that address should not be forwarded downward. These SubConn updates