kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [1/3] kudu git commit: Fix ToolTest.TestFsCheck for Mac
Date Tue, 16 May 2017 20:22:26 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 91f1f3715 -> 58f1a2169


Fix ToolTest.TestFsCheck for Mac

Stats on total live blocks aren't gathered for the FBM, which caused
ToolTest.TestFsCheck to fail on OS X. This patch fixes the test
so it passes on OS X.

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


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

Branch: refs/heads/master
Commit: 2f62443e1afb8c582e2ddd841219d15878e4bf92
Parents: 91f1f37
Author: Will Berkeley <wdberkeley@apache.org>
Authored: Tue May 16 12:12:12 2017 -0700
Committer: Will Berkeley <wdberkeley@gmail.com>
Committed: Tue May 16 20:11:32 2017 +0000

----------------------------------------------------------------------
 src/kudu/tools/kudu-tool-test.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/2f62443e/src/kudu/tools/kudu-tool-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/kudu-tool-test.cc b/src/kudu/tools/kudu-tool-test.cc
index 1ffd090..aef6d89 100644
--- a/src/kudu/tools/kudu-tool-test.cc
+++ b/src/kudu/tools/kudu-tool-test.cc
@@ -77,6 +77,8 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
+DECLARE_string(block_manager);
+
 namespace kudu {
 
 namespace tools {
@@ -236,8 +238,10 @@ class ToolTest : public KuduTest {
     } else {
       ASSERT_TRUE(s.ok());
     }
+    // Some stats aren't gathered for the FBM: see FileBlockManager::Open.
     ASSERT_STR_CONTAINS(
-        stdout, Substitute("Total live blocks: $0", expected_num_live));
+        stdout, Substitute("Total live blocks: $0",
+                           FLAGS_block_manager == "file" ? 0 : expected_num_live));
     ASSERT_STR_CONTAINS(
         stdout, Substitute("Total missing blocks: $0", expected_missing_blocks.size()));
     if (!expected_missing_blocks.empty()) {


Mime
View raw message