kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject incubator-kudu git commit: Don't use InMemoryEnv in deltafile-test
Date Tue, 31 May 2016 21:38:15 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 30d76a36c -> 975eeff46


Don't use InMemoryEnv in deltafile-test

Get out the vote: #NeverMemEnv.

This is causing problems due to Status::NotSupported for StatVfs() in an
upcoming patch.

Change-Id: I380249e6a72a93e1fde86a551c9d4d32d35904da
Reviewed-on: http://gerrit.cloudera.org:8080/3235
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/975eeff4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/975eeff4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/975eeff4

Branch: refs/heads/master
Commit: 975eeff467891be0abea23e2c4f6c304156e8785
Parents: 30d76a3
Author: Mike Percy <mpercy@apache.org>
Authored: Thu May 26 20:49:36 2016 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Tue May 31 21:37:46 2016 +0000

----------------------------------------------------------------------
 src/kudu/tablet/deltafile-test.cc | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/975eeff4/src/kudu/tablet/deltafile-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile-test.cc b/src/kudu/tablet/deltafile-test.cc
index 7de60ad..0ddc5a0 100644
--- a/src/kudu/tablet/deltafile-test.cc
+++ b/src/kudu/tablet/deltafile-test.cc
@@ -26,14 +26,14 @@
 #include "kudu/tablet/delta_tracker.h"
 #include "kudu/gutil/strings/strcat.h"
 #include "kudu/util/memenv/memenv.h"
-#include "kudu/util/test_macros.h"
+#include "kudu/util/test_util.h"
 
 DECLARE_int32(deltafile_default_block_size);
-DECLARE_bool(log_block_manager_test_hole_punching);
 DEFINE_int32(first_row_to_update, 10000, "the first row to update");
 DEFINE_int32(last_row_to_update, 100000, "the last row to update");
 DEFINE_int32(n_verify, 1, "number of times to verify the updates"
              "(useful for benchmarks");
+DECLARE_bool(never_fsync);
 
 using std::is_sorted;
 using std::shared_ptr;
@@ -48,19 +48,18 @@ using fs::WritableBlock;
 // Test path to write delta file to (in in-memory environment)
 const char kTestPath[] = "/tmp/test";
 
-class TestDeltaFile : public ::testing::Test {
+class TestDeltaFile : public KuduTest {
  public:
   TestDeltaFile() :
-    env_(NewMemEnv(Env::Default())),
     schema_(CreateSchema()),
     arena_(1024, 1024) {
-    // Can't check on-disk file size with a memenv.
-    FLAGS_log_block_manager_test_hole_punching = false;
+    // Speed up unit tests.
+    FLAGS_never_fsync = true;
   }
 
  public:
   void SetUp() OVERRIDE {
-    fs_manager_.reset(new FsManager(env_.get(), kTestPath));
+    fs_manager_.reset(new FsManager(env_.get(), GetTestDataDirectory() + "/fs"));
     ASSERT_OK(fs_manager_->CreateInitialFileSystemLayout());
     ASSERT_OK(fs_manager_->Open());
   }
@@ -186,7 +185,6 @@ class TestDeltaFile : public ::testing::Test {
   }
 
  protected:
-  gscoped_ptr<Env> env_;
   gscoped_ptr<FsManager> fs_manager_;
   Schema schema_;
   Arena arena_;


Mime
View raw message