You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2016/12/08 00:22:48 UTC

kudu git commit: log-rolling-itest: wait for the master on first start

Repository: kudu
Updated Branches:
  refs/heads/master 1e957ae61 -> b4d1fac80


log-rolling-itest: wait for the master on first start

This should deflake the test completely.

Change-Id: I816d4dc547b358baf2696531626c43dc5731c438
Reviewed-on: http://gerrit.cloudera.org:8080/5407
Reviewed-by: Dan Burkert <da...@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/b4d1fac8
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/b4d1fac8
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/b4d1fac8

Branch: refs/heads/master
Commit: b4d1fac808059ec72258a65c09955a56cdc78c66
Parents: 1e957ae
Author: Adar Dembo <ad...@cloudera.com>
Authored: Wed Dec 7 16:00:10 2016 -0800
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Thu Dec 8 00:22:25 2016 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/external_mini_cluster.h | 5 -----
 src/kudu/integration-tests/log-rolling-itest.cc    | 8 ++++++++
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/b4d1fac8/src/kudu/integration-tests/external_mini_cluster.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.h b/src/kudu/integration-tests/external_mini_cluster.h
index e3ed95c..f4049ce 100644
--- a/src/kudu/integration-tests/external_mini_cluster.h
+++ b/src/kudu/integration-tests/external_mini_cluster.h
@@ -147,11 +147,6 @@ class ExternalMiniCluster : public MiniClusterBase {
   // Restarts the cluster. Requires that it has been Shutdown() first.
   Status Restart();
 
-  // Like the previous method but performs initialization synchronously, i.e.
-  // this will wait for all TS's to be started and initialized. Tests should
-  // use this if they interact with tablets immediately after Start();
-  Status StartSync();
-
   // Add a new TS to the cluster. The new TS is started.
   // Requires that the master is already running.
   Status AddTabletServer();

http://git-wip-us.apache.org/repos/asf/kudu/blob/b4d1fac8/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 4b6172f..bd21150 100644
--- a/src/kudu/integration-tests/log-rolling-itest.cc
+++ b/src/kudu/integration-tests/log-rolling-itest.cc
@@ -52,6 +52,14 @@ TEST(LogRollingITest, TestLogCleanupOnStartup) {
   ExternalMiniCluster cluster(opts);
   ASSERT_OK(cluster.Start());
 
+  // Explicitly wait for the catalog manager because we've got no tservers in
+  // our cluster, which means the usual waiting in ExternalMiniCluster::Start()
+  // won't work.
+  //
+  // This is only needed the first time the master starts so that it can write
+  // the catalog out to disk.
+  ASSERT_OK(cluster.master()->WaitForCatalogManager());
+
   for (int i = 1; i <= 10; i++) {
     ASSERT_EQ(std::min(3, i), CountInfoLogs(*cluster.master()->log_dir()));
     cluster.master()->Shutdown();