kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/3] kudu git commit: log-rolling-itest: wait for log roller on server startup
Date Fri, 09 Dec 2016 00:19:46 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 18a8a90f7 -> 4bd36c46c


log-rolling-itest: wait for log roller on server startup

The log roller runs early in the startup sequence, but we were still
hitting cases where the test outran the roller.

Change-Id: Iefbf678163c0f4ba07eedfd762177c5ace5e35e6
Reviewed-on: http://gerrit.cloudera.org:8080/5431
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 0f6562723a4d69f45a78f0ed2859abbc5f447d06
Parents: 18a8a90
Author: Dan Burkert <danburkert@apache.org>
Authored: Thu Dec 8 15:07:32 2016 -0800
Committer: Todd Lipcon <todd@apache.org>
Committed: Fri Dec 9 00:03:10 2016 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/log-rolling-itest.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/0f656272/src/kudu/integration-tests/log-rolling-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/log-rolling-itest.cc b/src/kudu/integration-tests/log-rolling-itest.cc
index bd21150..899ca28 100644
--- a/src/kudu/integration-tests/log-rolling-itest.cc
+++ b/src/kudu/integration-tests/log-rolling-itest.cc
@@ -26,6 +26,7 @@
 #include "kudu/gutil/strings/substitute.h"
 #include "kudu/integration-tests/external_mini_cluster.h"
 #include "kudu/util/env.h"
+#include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
 using std::string;
@@ -61,7 +62,9 @@ TEST(LogRollingITest, TestLogCleanupOnStartup) {
   ASSERT_OK(cluster.master()->WaitForCatalogManager());
 
   for (int i = 1; i <= 10; i++) {
-    ASSERT_EQ(std::min(3, i), CountInfoLogs(*cluster.master()->log_dir()));
+    AssertEventually([&] () {
+        ASSERT_EQ(std::min(3, i), CountInfoLogs(*cluster.master()->log_dir()));
+    });
     cluster.master()->Shutdown();
     ASSERT_OK(cluster.master()->Restart());
   }


Mime
View raw message