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 2017/10/18 21:14:13 UTC

kudu git commit: [client-stress-test] do not crash if client failed

Repository: kudu
Updated Branches:
  refs/heads/master 67382e9a4 -> 20118c7e4


[client-stress-test] do not crash if client failed

Do not crash the test if failed to build Kudu client instance in the
TestUniqueClientIds scenario, just use regular ASSERT_OK() instead,
allowing the test cluster to wind down, so it would be possible to
check on the status of the master and tablet servers during shutdown.

With crashing the test on an error, it's not possible to figure out
whether client <--> server negotiation failed due to a crashed server
or something else.

As for the context, the ClientStressTest.TestUniqueClientIds test
has been flaky for a while, failing with errors like the following:

  Client connection negotiation failed: client connection to IP:port: \
    Read zero bytes on a blocking Recv() call: Transferred 0 of 4 bytes

Change-Id: I558fcb02f697d1ec216538416826d96dcda32a1e
Reviewed-on: http://gerrit.cloudera.org:8080/8310
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/20118c7e
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/20118c7e
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/20118c7e

Branch: refs/heads/master
Commit: 20118c7e45b701927174f8efdac37dc3b4cc2fb1
Parents: 67382e9
Author: Alexey Serbin <as...@cloudera.com>
Authored: Tue Oct 17 18:18:42 2017 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Wed Oct 18 21:13:58 2017 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/client-stress-test.cc | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/20118c7e/src/kudu/integration-tests/client-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-stress-test.cc b/src/kudu/integration-tests/client-stress-test.cc
index c1565ac..f420ca3 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -306,12 +306,13 @@ TEST_F(ClientStressTest, TestUniqueClientIds) {
   set<string> client_ids;
   for (int i = 0; i < 1000; i++) {
     client::sp::shared_ptr<KuduClient> client;
-    CHECK_OK(cluster_->CreateClient(nullptr, &client));
-    string client_id = client->data_->client_id_;
-    auto result = client_ids.insert(client_id);
-    EXPECT_TRUE(result.second) << "Unique id generation failed. New client id: " << client_id
-                                   << " had already been used. Generated ids: "
-                                   << JoinStrings(client_ids, ",");
+    ASSERT_OK(cluster_->CreateClient(nullptr, &client));
+    const string& client_id = client->data_->client_id_;
+    auto result = client_ids.emplace(client_id);
+    EXPECT_TRUE(result.second) << "Unique id generation failed. New client id: "
+                               << client_id
+                               << " had already been used. Generated ids: "
+                               << JoinStrings(client_ids, ",");
   }
 }