kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: [integration-tests] WARN_UNUSED_RESULT for SetFlag()
Date Sun, 25 Jun 2017 19:10:32 GMT
Repository: kudu
Updated Branches:
  refs/heads/master ecdc6c0e2 -> aa0bac0cc


[integration-tests] WARN_UNUSED_RESULT for SetFlag()

Added WARN_UNUSED_RESULT specifier for ExternalMiniCluster::SetFlag()
method.  Also, updated a few call sites to check the result of calling
the method.

Change-Id: I6684f054762e48a558db09ad03ab0f77053487e4
Reviewed-on: http://gerrit.cloudera.org:8080/7286
Reviewed-by: Todd Lipcon <todd@apache.org>
Tested-by: Alexey Serbin <aserbin@cloudera.com>


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

Branch: refs/heads/master
Commit: aa0bac0ccb8993cbbf4260154ae1ea920c8f7998
Parents: ecdc6c0
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Fri Jun 23 15:57:25 2017 -0700
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Sun Jun 25 19:09:56 2017 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/client-stress-test.cc   |  2 +-
 src/kudu/integration-tests/external_mini_cluster.h |  2 +-
 src/kudu/integration-tests/ts_recovery-itest.cc    | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/aa0bac0c/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 91ac4d3..2d7c0b7 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -115,7 +115,7 @@ TEST_F(ClientStressTest, TestLookupTimeouts) {
 // scan starting at random points in the key space.
 TEST_F(ClientStressTest, TestStartScans) {
   for (int i = 0; i < cluster_->num_tablet_servers(); i++) {
-    cluster_->SetFlag(cluster_->tablet_server(i), "log_preallocate_segments", "0");
+    ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(i), "log_preallocate_segments",
"0"));
   }
   TestWorkload work(cluster_.get());
   work.set_num_tablets(40);

http://git-wip-us.apache.org/repos/asf/kudu/blob/aa0bac0c/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 7f275cb..4484c75 100644
--- a/src/kudu/integration-tests/external_mini_cluster.h
+++ b/src/kudu/integration-tests/external_mini_cluster.h
@@ -279,7 +279,7 @@ class ExternalMiniCluster : public MiniClusterBase {
   // is considered unsafe to change at runtime, it is changed.
   Status SetFlag(ExternalDaemon* daemon,
                  const std::string& flag,
-                 const std::string& value);
+                 const std::string& value) WARN_UNUSED_RESULT;
 
   // Set the path where daemon binaries can be found.
   // Overrides 'daemon_bin_path' set by ExternalMiniClusterOptions.

http://git-wip-us.apache.org/repos/asf/kudu/blob/aa0bac0c/src/kudu/integration-tests/ts_recovery-itest.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/ts_recovery-itest.cc b/src/kudu/integration-tests/ts_recovery-itest.cc
index c2f6241..e697f2d 100644
--- a/src/kudu/integration-tests/ts_recovery-itest.cc
+++ b/src/kudu/integration-tests/ts_recovery-itest.cc
@@ -92,8 +92,8 @@ TEST_F(TsRecoveryITest, TestRestartWithOrphanedReplicates) {
   work.Setup();
 
   // Crash when the WAL contains a replicate message but no corresponding commit.
-  cluster_->SetFlag(cluster_->tablet_server(0),
-                    "fault_crash_before_append_commit", "0.05");
+  ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(0),
+                              "fault_crash_before_append_commit", "0.05"));
   work.Start();
 
   // Wait for the process to crash due to the injected fault.
@@ -126,8 +126,8 @@ TEST_F(TsRecoveryITest, TestRestartWithOrphanedReplicates) {
 // successful operations.
 TEST_F(TsRecoveryITest, TestRestartWithPendingCommitFromFailedOp) {
   NO_FATALS(StartClusterOneTs());
-  cluster_->SetFlag(cluster_->tablet_server(0),
-                    "fault_crash_before_append_commit", "0.01");
+  ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(0),
+                              "fault_crash_before_append_commit", "0.01"));
 
   // Set up the workload to write many duplicate rows, and with only
   // one operation per batch. This means that by the time we crash
@@ -540,7 +540,7 @@ TEST_P(Kudu969Test, Test) {
 
   // Set a small flush threshold so that we flush a lot (causing more compactions
   // as well).
-  cluster_->SetFlag(cluster_->tablet_server(0), "flush_threshold_mb", "1");
+  ASSERT_OK(cluster_->SetFlag(cluster_->tablet_server(0), "flush_threshold_mb", "1"));
 
   // Use TestWorkload to create a table
   TestWorkload work(cluster_.get());
@@ -562,7 +562,7 @@ TEST_P(Kudu969Test, Test) {
 
   // Enable the fault point to crash after a few flushes or compactions.
   auto ts = cluster_->tablet_server(0);
-  cluster_->SetFlag(ts, GetParam(), "0.3");
+  ASSERT_OK(cluster_->SetFlag(ts, GetParam(), "0.3"));
 
   // Insert some data.
   shared_ptr<KuduSession> session = client->NewSession();


Mime
View raw message