Skip to content

Commit 64cea5e

Browse files
authored
chore(spanner): quash warning about a leaked mocked object (#6261)
Suppress the warning about leaking the mock stub until #4038 is fixed. Fixes #6145.
1 parent 03f168a commit 64cea5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google/cloud/spanner/database_admin_connection_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,10 @@ TEST(DatabaseAdminConnectionTest, CreateBackupSuccess) {
912912
/// @test Verify that using an encryption key works.
913913
TEST(DatabaseAdminClientTest, CreateBackupWithEncryption) {
914914
auto mock = std::make_shared<MockDatabaseAdminStub>();
915+
// Suppress a false leak.
916+
// TODO(#4038): After we fix the issue #4038, we won't need to use
917+
// `AllowLeak()` any more.
918+
Mock::AllowLeak(mock.get());
915919
Database dbase("test-project", "test-instance", "test-database");
916920

917921
EXPECT_CALL(*mock, CreateBackup(_, _))

0 commit comments

Comments
 (0)