Fix a valgrind warning
Summary: A latest valgrind test found a recently added unit test has memory leak, which is because DB is not closed at the end of the test. Test Plan: re-run the valgrind locally and make sure there's no memory leakage any more. Reviewers: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D13725
This commit is contained in:
parent
100fa8e013
commit
7e91b86f4d
@ -218,6 +218,7 @@ TEST(DeleteFileTest, DeleteLogFiles) {
|
|||||||
archived_log->PathName().c_str());
|
archived_log->PathName().c_str());
|
||||||
ASSERT_OK(db_->DeleteFile(archived_log->PathName()));
|
ASSERT_OK(db_->DeleteFile(archived_log->PathName()));
|
||||||
ASSERT_TRUE(!env_->FileExists(dbname_ + "/" + archived_log->PathName()));
|
ASSERT_TRUE(!env_->FileExists(dbname_ + "/" + archived_log->PathName()));
|
||||||
|
CloseDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace rocksdb
|
} //namespace rocksdb
|
||||||
|
Loading…
Reference in New Issue
Block a user