From 23089fd2816c7c27302bb7db222fdfa6fa0fb7d0 Mon Sep 17 00:00:00 2001 From: sdong Date: Fri, 15 Apr 2016 17:13:12 -0700 Subject: [PATCH] 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 --- db/write_callback_test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/write_callback_test.cc b/db/write_callback_test.cc index 8acd60df8..33aaab7f4 100644 --- a/db/write_callback_test.cc +++ b/db/write_callback_test.cc @@ -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(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);