diff --git a/xds/internal/balancer/clusterimpl/tests/balancer_test.go b/xds/internal/balancer/clusterimpl/tests/balancer_test.go index 61922ae5a447..0791f1438e65 100644 --- a/xds/internal/balancer/clusterimpl/tests/balancer_test.go +++ b/xds/internal/balancer/clusterimpl/tests/balancer_test.go @@ -335,6 +335,11 @@ func (s) TestLoadReportingPickFirstMultiLocality(t *testing.T) { // Stop server 1 and send one more rpc. Now the request should go to server 2. server1.Stop() + // The first call may go to server 1 and fail, so we send two requests. + if _, err := client.EmptyCall(ctx, &testpb.Empty{}, grpc.Peer(&peer)); err != nil { + t.Logf("First rpc EmptyCall() failed: %v", err) + } + if _, err := client.EmptyCall(ctx, &testpb.Empty{}, grpc.Peer(&peer)); err != nil { t.Fatalf("rpc EmptyCall() failed: %v", err) }