You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2018/09/25 18:19:43 UTC

kudu git commit: [tablet_server-test] cleaner exit-on-failure in TestStatus

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 <as...@cloudera.com>
Reviewed-by: Adar Dembo <ad...@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 <as...@cloudera.com>
Authored: Mon Sep 24 19:25:48 2018 -0700
Committer: Alexey Serbin <as...@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) {