write_callback_test: clean test directory before running tests

Summary: write_callback_test fails if previous run didn't finish cleanly. Clean the DB before runing the test.

Test Plan: Run the test that see it doesn't fail any more.

Reviewers: andrewkr, yhchiang, yiwu, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: kradhakrishnan, leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D56859
This commit is contained in:
sdong 2016-04-15 17:13:12 -07:00
parent 792762c42c
commit 23089fd281

View File

@ -123,6 +123,7 @@ TEST_F(WriteCallbackTest, WriteWithCallbackTest) {
DB* db;
DBImpl* db_impl;
DestroyDB(dbname, options);
ASSERT_OK(DB::Open(options, dbname, &db));
db_impl = dynamic_cast<DBImpl*>(db);
@ -282,6 +283,8 @@ TEST_F(WriteCallbackTest, WriteCallBackTest) {
DB* db;
DBImpl* db_impl;
DestroyDB(dbname, options);
options.create_if_missing = true;
Status s = DB::Open(options, dbname, &db);
ASSERT_OK(s);