diff --git a/unit_testing/iam_proxy_test.cc b/unit_testing/iam_proxy_test.cc index 14a2dab3e..384d57873 100644 --- a/unit_testing/iam_proxy_test.cc +++ b/unit_testing/iam_proxy_test.cc @@ -87,6 +87,7 @@ class IamProxyTest : public testing::Test { void TearDown() override { token_cache.clear(); cleanup_odbc_handles(nullptr, dbc, ds); + delete mock_connection_proxy; } }; @@ -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) {