kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: [tablet_server-test] cleaner exit-on-failure in TestStatus
Date Tue, 25 Sep 2018 18:19:43 GMT
Repository: kudu
Updated Branches:
  refs/heads/master a09c89abc -> 4fba6e8a1


[tablet_server-test] cleaner exit-on-failure in TestStatus

Updated the TestStatus scenario of the TabletServerTest to terminate
cleaner and faster in case of a failure when restarting tablet server.

Prior to this fix, when the mini tablet server fails to restart,
the test scenario would run indefinitely or until some higher-level
test framework terminates the tablet_server-test process.

As for the reason behind the failure on restart, the mini tablet
server might fail to restart if one the ports it tries to bind to
is used by another process.

Change-Id: I7c5efef9e579f6fd357357517c32a26440896967
Reviewed-on: http://gerrit.cloudera.org:8080/11506
Tested-by: Alexey Serbin <aserbin@cloudera.com>
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/4fba6e8a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/4fba6e8a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/4fba6e8a

Branch: refs/heads/master
Commit: 4fba6e8a16378ffc00bd399ca65161e96f9ce20e
Parents: a09c89a
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Mon Sep 24 19:25:48 2018 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Tue Sep 25 18:14:03 2018 +0000

----------------------------------------------------------------------
 src/kudu/tserver/tablet_server-test.cc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/4fba6e8a/src/kudu/tserver/tablet_server-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server-test.cc b/src/kudu/tserver/tablet_server-test.cc
index 084da03..5217fe0 100644
--- a/src/kudu/tserver/tablet_server-test.cc
+++ b/src/kudu/tserver/tablet_server-test.cc
@@ -234,6 +234,7 @@ TEST_F(TabletServerTest, TestStatus) {
     }
   });
   SCOPED_CLEANUP({
+    latch.CountDown();
     status_thread.join();
   });
 
@@ -244,9 +245,6 @@ TEST_F(TabletServerTest, TestStatus) {
     mini_server_->Shutdown();
     ASSERT_OK(mini_server_->Restart());
   }
-
-  // All done, stop the test thread.
-  latch.CountDown();
 }
 
 TEST_F(TabletServerTest, TestServerClock) {


Mime
View raw message