Repository: kudu
Updated Branches:
  refs/heads/master e157663ba -> 8c744afa9


leader_election-test: add some std::move calls during constructors

Forgot to do this in the commit that made these pass-by-value.

Change-Id: I654077c74695d984dc0c28102c005ec56318b7e5
Reviewed-on: http://gerrit.cloudera.org:8080/10883
Reviewed-by: Todd Lipcon <t...@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 8c744afa99e294864718c06be2dc099dd14fea81
Parents: e157663
Author: Adar Dembo <a...@cloudera.com>
Authored: Fri Jul 6 11:31:41 2018 -0700
Committer: Adar Dembo <a...@cloudera.com>
Committed: Fri Jul 6 20:17:03 2018 +0000

----------------------------------------------------------------------
 src/kudu/consensus/leader_election-test.cc | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/8c744afa/src/kudu/consensus/leader_election-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/leader_election-test.cc 
b/src/kudu/consensus/leader_election-test.cc
index f7041ab..f0f7b47 100644
--- a/src/kudu/consensus/leader_election-test.cc
+++ b/src/kudu/consensus/leader_election-test.cc
@@ -231,7 +231,8 @@ scoped_refptr<LeaderElection> 
LeaderElectionTest::SetUpElectionWithHighTermVoter
   request.set_tablet_id(tablet_id_);
 
   scoped_refptr<LeaderElection> election(
-      new LeaderElection(config_, proxy_factory_.get(), request, 
std::move(counter),
+      new LeaderElection(config_, proxy_factory_.get(),
+                         std::move(request), std::move(counter),
                          MonoDelta::FromSeconds(kLeaderElectionTimeoutSecs),
                          std::bind(&LeaderElectionTest::ElectionCallback,
                                    this,
@@ -288,7 +289,8 @@ scoped_refptr<LeaderElection> 
LeaderElectionTest::SetUpElectionWithGrantDenyErro
   request.set_tablet_id(tablet_id_);
 
   scoped_refptr<LeaderElection> election(
-      new LeaderElection(config_, proxy_factory_.get(), request, 
std::move(counter),
+      new LeaderElection(config_, proxy_factory_.get(),
+                         std::move(request), std::move(counter),
                          MonoDelta::FromSeconds(kLeaderElectionTimeoutSecs),
                          std::bind(&LeaderElectionTest::ElectionCallback,
                                    this,
@@ -315,7 +317,8 @@ TEST_F(LeaderElectionTest, TestPerfectElection) {
     request.set_tablet_id(tablet_id_);
 
     scoped_refptr<LeaderElection> election(
-        new LeaderElection(config_, proxy_factory_.get(), request, 
std::move(counter),
+        new LeaderElection(config_, proxy_factory_.get(),
+                           std::move(request), std::move(counter),
                            MonoDelta::FromSeconds(kLeaderElectionTimeoutSecs),
                            std::bind(&LeaderElectionTest::ElectionCallback,
                                      this,
@@ -444,7 +447,8 @@ TEST_F(LeaderElectionTest, TestFailToCreateProxy) {
 
   gscoped_ptr<VoteCounter> counter = InitVoteCounter(kNumVoters, 
kMajoritySize);
   scoped_refptr<LeaderElection> election(
-      new LeaderElection(config_, proxy_factory_.get(), request, 
std::move(counter),
+      new LeaderElection(config_, proxy_factory_.get(),
+                         std::move(request), std::move(counter),
                          MonoDelta::FromSeconds(kLeaderElectionTimeoutSecs),
                          std::bind(&LeaderElectionTest::ElectionCallback,
                                    this,

Reply via email to