diff --git a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc index aa0f0dd815b..2bef38e84b8 100644 --- a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc @@ -363,6 +363,13 @@ TEST_P(CdsTest, MetricLabels) { OptionalLabelComponent::kXdsLocalityLabels, ::testing::Pointee(::testing::ElementsAre(::testing::Pair( "grpc.lb.locality", LocalityNameString("locality1"))))))); + // TODO(yashkt, yijiem): This shutdown shouldn't actually be necessary. + // The only reason it's here is to add a delay before + // fake_client_call_tracer_factory goes out of scope, since there may + // be lingering callbacks in the call stack that are using the + // CallAttemptTracer even after we get here, which would then cause a + // crash. Find a cleaner way to fix this. + balancer_->Shutdown(); } //