From d2646941b058e8e27d8b6e8931b89a0f29838513 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 1 Jun 2020 15:03:22 -0700 Subject: [PATCH] Fix xds_end2end_test to not set the response state back to SENT. --- test/cpp/end2end/xds_end2end_test.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index a8e66858953..463503833df 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -922,7 +922,10 @@ class AdsServiceImpl : public AggregatedDiscoveryService::Service, const SubscriptionNameMap& subscription_name_map, const std::set& resources_added_to_response, DiscoveryResponse* response) { - resource_type_response_state_[resource_type].state = ResponseState::SENT; + auto& response_state = resource_type_response_state_[resource_type]; + if (response_state.state == ResponseState::NOT_SENT) { + response_state.state = ResponseState::SENT; + } response->set_type_url(resource_type); response->set_version_info(absl::StrCat(version)); response->set_nonce(absl::StrCat(version));