From e11669d8accffbdc68ad0416f604341b36d8251b Mon Sep 17 00:00:00 2001 From: Karen Chen Date: Wed, 11 Sep 2024 00:23:22 -0700 Subject: [PATCH] chore: clean up memory leaks in unit tests --- unit_testing/iam_proxy_test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unit_testing/iam_proxy_test.cc b/unit_testing/iam_proxy_test.cc index 14a2dab3e..645c056d9 100644 --- a/unit_testing/iam_proxy_test.cc +++ b/unit_testing/iam_proxy_test.cc @@ -85,6 +85,7 @@ class IamProxyTest : public testing::Test { } void TearDown() override { + delete mock_connection_proxy; token_cache.clear(); cleanup_odbc_handles(nullptr, dbc, ds); } @@ -97,8 +98,6 @@ TEST_F(IamProxyTest, TokenExpiration) { std::this_thread::sleep_for(std::chrono::seconds(time_to_expire + 1)); EXPECT_TRUE(info.is_expired()); - - delete mock_connection_proxy; } TEST_F(IamProxyTest, TokenGetsCachedAndRetrieved) {