This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 3b74ec7d532151488d86443f7af721ce4cd61b6c Author: Alexey Serbin <[email protected]> AuthorDate: Thu Sep 19 17:39:33 2019 -0700 [itest] unify signature of functions using TServerDetails* This patch updates signatures of test cluster-related helper functions to use 'const TServerDetails*' when possible. The motivation for this change was finding that it's possible to use 'const TServerDetails*' argument for some of those, but for others it would require adding const cast. There are some functions left that still use non-const TServerDetails*. Those are eventually call GetLastOpIdForEachReplica(), where one of the parameters has type of 'const vector<TServerDetails*>&'. This patch doesn't contain any functional changes. Change-Id: I7d682be4572f588ee073efdc73d52089d6909dc0 Reviewed-on: http://gerrit.cloudera.org:8080/14269 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Adar Dembo <[email protected]> --- src/kudu/integration-tests/cluster_itest_util.cc | 10 +++++----- src/kudu/integration-tests/cluster_itest_util.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/kudu/integration-tests/cluster_itest_util.cc b/src/kudu/integration-tests/cluster_itest_util.cc index 0b287de..2d520f6 100644 --- a/src/kudu/integration-tests/cluster_itest_util.cc +++ b/src/kudu/integration-tests/cluster_itest_util.cc @@ -980,7 +980,7 @@ Status WaitForNumVotersInConfigOnMaster(const shared_ptr<MasterServiceProxy>& ma return Status::OK(); } -Status WaitForNumTabletsOnTS(TServerDetails* ts, +Status WaitForNumTabletsOnTS(const TServerDetails* ts, int count, const MonoDelta& timeout, vector<ListTabletsResponsePB::StatusAndSchemaPB>* tablets, @@ -1016,7 +1016,7 @@ Status WaitForNumTabletsOnTS(TServerDetails* ts, return Status::OK(); } -Status CheckIfTabletInState(TServerDetails* ts, +Status CheckIfTabletInState(const TServerDetails* ts, const std::string& tablet_id, tablet::TabletStatePB expected_state, const MonoDelta& timeout) { @@ -1036,13 +1036,13 @@ Status CheckIfTabletInState(TServerDetails* ts, return Status::NotFound("Tablet " + tablet_id + " not found"); } -Status CheckIfTabletRunning(TServerDetails* ts, +Status CheckIfTabletRunning(const TServerDetails* ts, const std::string& tablet_id, const MonoDelta& timeout) { return CheckIfTabletInState(ts, tablet_id, tablet::RUNNING, timeout); } -Status WaitUntilTabletInState(TServerDetails* ts, +Status WaitUntilTabletInState(const TServerDetails* ts, const std::string& tablet_id, tablet::TabletStatePB state, const MonoDelta& timeout) { @@ -1071,7 +1071,7 @@ Status WaitUntilTabletInState(TServerDetails* ts, } // Wait until the specified tablet is in RUNNING state. -Status WaitUntilTabletRunning(TServerDetails* ts, +Status WaitUntilTabletRunning(const TServerDetails* ts, const std::string& tablet_id, const MonoDelta& timeout) { return WaitUntilTabletInState(ts, tablet_id, tablet::RUNNING, timeout); diff --git a/src/kudu/integration-tests/cluster_itest_util.h b/src/kudu/integration-tests/cluster_itest_util.h index b311b95..232095f 100644 --- a/src/kudu/integration-tests/cluster_itest_util.h +++ b/src/kudu/integration-tests/cluster_itest_util.h @@ -375,31 +375,31 @@ Status WaitForNumVotersInConfigOnMaster( // must also be in the specified state for the wait to be considered // successful. Status WaitForNumTabletsOnTS( - TServerDetails* ts, + const TServerDetails* ts, int count, const MonoDelta& timeout, std::vector<tserver::ListTabletsResponsePB::StatusAndSchemaPB>* tablets = nullptr, boost::optional<tablet::TabletStatePB> state = boost::none); // Check if the tablet is in the specified state. -Status CheckIfTabletInState(TServerDetails* ts, +Status CheckIfTabletInState(const TServerDetails* ts, const std::string& tablet_id, tablet::TabletStatePB expected_state, const MonoDelta& timeout); // Check if the given tablet is RUNNING. -Status CheckIfTabletRunning(TServerDetails* ts, +Status CheckIfTabletRunning(const TServerDetails* ts, const std::string& tablet_id, const MonoDelta& timeout); // Wait until the specified replica is in the specified state. -Status WaitUntilTabletInState(TServerDetails* ts, +Status WaitUntilTabletInState(const TServerDetails* ts, const std::string& tablet_id, tablet::TabletStatePB state, const MonoDelta& timeout); // Wait until the specified tablet is in RUNNING state. -Status WaitUntilTabletRunning(TServerDetails* ts, +Status WaitUntilTabletRunning(const TServerDetails* ts, const std::string& tablet_id, const MonoDelta& timeout);
