From 45f0030458da6a621af37828e3457bfd467932db Mon Sep 17 00:00:00 2001 From: Kai Liu Date: Tue, 19 Feb 2013 00:09:16 -0800 Subject: [PATCH] Fix the "IO error" in auto_roll_logger_test Summary: I missed InitTestDb() in one of my tess. InitTestDb() initializes the test directory, without which the test will throw IO error. This problem didn't occur before because I've already run the tests before so the test directory is already there. Test Plan: Reviewers: dhruba CC: Task ID: # Blame Rev: --- Makefile | 2 ++ util/auto_roll_logger_test.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 3d075e21a..3ef5025fa 100644 --- a/Makefile +++ b/Makefile @@ -55,8 +55,10 @@ TESTS = \ version_set_test \ reduce_levels_test \ write_batch_test \ + auto_roll_logger_test \ filelock_test + TOOLS = \ manifest_dump \ sst_dump \ diff --git a/util/auto_roll_logger_test.cc b/util/auto_roll_logger_test.cc index 12a436aab..4b12fb857 100755 --- a/util/auto_roll_logger_test.cc +++ b/util/auto_roll_logger_test.cc @@ -119,6 +119,7 @@ uint64_t AutoRollLoggerTest::RollLogFileByTimeTest( } TEST(AutoRollLoggerTest, RollLogFileBySize) { + InitTestDb(); size_t log_max_size = 1024 * 5; AutoRollLogger* logger = new AutoRollLogger(