Skip to content

Commit

Permalink
test cleanup to avoid tsan
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Suissa-Peleg <[email protected]>
  • Loading branch information
adisuissa committed Oct 23, 2024
1 parent 0e33485 commit 4168430
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/integration/ads_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2838,6 +2838,22 @@ class AdsReplacementIntegrationTest : public AdsIntegrationTest {
}
}

void cleanUpSecondXdsConnection() {
// Cleanup the second xds connection if used.
if (second_xds_connection_ != nullptr) {
AssertionResult result = second_xds_connection_->close();
RELEASE_ASSERT(result, result.message());
result = second_xds_connection_->waitForDisconnect();
RELEASE_ASSERT(result, result.message());
second_xds_connection_.reset();
}
}

void TearDown() override {
cleanUpSecondXdsConnection();
AdsIntegrationTest::TearDown();
}

// Second ADS stream.
FakeUpstream* second_xds_upstream_{};
FakeHttpConnectionPtr second_xds_connection_;
Expand Down

0 comments on commit 4168430

Please sign in to comment.