You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2017/12/12 23:56:57 UTC

[3/3] kudu git commit: [quorum_util] fix build

[quorum_util] fix build

This is a follow-up for 83b19ef320dba9a85a86845dc515587ce28c9ac3.
It seems the previous patch needed rebase prior to pushing.

Change-Id: Ided12a63f0cae539fa2dd690a44c29423ad7ff73
Reviewed-on: http://gerrit.cloudera.org:8080/8821
Reviewed-by: Mike Percy <mp...@apache.org>
Tested-by: Alexey Serbin <as...@cloudera.com>


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

Branch: refs/heads/master
Commit: 887443e0d44d462f7a57507917a4a77b3495c4c7
Parents: 83b19ef
Author: Alexey Serbin <as...@cloudera.com>
Authored: Tue Dec 12 15:02:27 2017 -0800
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Tue Dec 12 23:11:23 2017 +0000

----------------------------------------------------------------------
 src/kudu/consensus/quorum_util-test.cc | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/887443e0/src/kudu/consensus/quorum_util-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/quorum_util-test.cc b/src/kudu/consensus/quorum_util-test.cc
index 2014d71..3d23bcb 100644
--- a/src/kudu/consensus/quorum_util-test.cc
+++ b/src/kudu/consensus/quorum_util-test.cc
@@ -847,13 +847,13 @@ TEST(QuorumUtilTest, ReplaceAttributeBasic) {
     AddPeer(&config, "C", V, '+', {{"REPLACE", true}});
     AddPeer(&config, "D", V, replica_health, {{"REPLACE", true}});
     string to_evict;
-    ASSERT_TRUE(CanEvictReplica(config, "A", 3, &to_evict));
+    ASSERT_TRUE(ShouldEvictReplica(config, "A", 3, &to_evict));
     if (replica_health == '+') {
       EXPECT_NE("A", to_evict);
     } else {
       EXPECT_EQ("D", to_evict);
     }
-    EXPECT_TRUE(IsUnderReplicated(config, 3));
+    EXPECT_TRUE(ShouldAddReplica(config, 3));
   }
   for (auto health_status : { '?', '-' }) {
     RaftConfigPB config;
@@ -865,9 +865,9 @@ TEST(QuorumUtilTest, ReplaceAttributeBasic) {
       SCOPED_TRACE(Substitute("health status '$0', leader $1",
                               health_status, leader_replica));
       string to_evict;
-      ASSERT_TRUE(CanEvictReplica(config, leader_replica, 3, &to_evict));
+      ASSERT_TRUE(ShouldEvictReplica(config, leader_replica, 3, &to_evict));
       EXPECT_EQ("A", to_evict);
-      EXPECT_TRUE(IsUnderReplicated(config, 3));
+      EXPECT_TRUE(ShouldAddReplica(config, 3));
     }
   }
   {
@@ -877,9 +877,9 @@ TEST(QuorumUtilTest, ReplaceAttributeBasic) {
     AddPeer(&config, "C", V, '+', {{"REPLACE", true}});
     AddPeer(&config, "D", V, '-');
     string to_evict;
-    ASSERT_TRUE(CanEvictReplica(config, "A", 3, &to_evict));
+    ASSERT_TRUE(ShouldEvictReplica(config, "A", 3, &to_evict));
     EXPECT_EQ("D", to_evict);
-    EXPECT_TRUE(IsUnderReplicated(config, 3));
+    EXPECT_TRUE(ShouldAddReplica(config, 3));
   }
   {
     RaftConfigPB config;
@@ -887,8 +887,8 @@ TEST(QuorumUtilTest, ReplaceAttributeBasic) {
     AddPeer(&config, "B", V, '+', {{"REPLACE", true}});
     AddPeer(&config, "C", V, '+', {{"REPLACE", true}});
     AddPeer(&config, "D", V, '?');
-    EXPECT_FALSE(CanEvictReplica(config, "B", 3));
-    EXPECT_TRUE(IsUnderReplicated(config, 3));
+    EXPECT_FALSE(ShouldEvictReplica(config, "B", 3));
+    EXPECT_TRUE(ShouldAddReplica(config, 3));
   }
   for (auto health_status : { '?', '-' }) {
     SCOPED_TRACE(Substitute("health status '$0'", health_status));
@@ -899,9 +899,9 @@ TEST(QuorumUtilTest, ReplaceAttributeBasic) {
     AddPeer(&config, "D", V, health_status, {{"REPLACE", true}});
     AddPeer(&config, "E", V, '+');
     string to_evict;
-    ASSERT_TRUE(CanEvictReplica(config, "A", 3, &to_evict));
+    ASSERT_TRUE(ShouldEvictReplica(config, "A", 3, &to_evict));
     EXPECT_EQ("D", to_evict);
-    EXPECT_TRUE(IsUnderReplicated(config, 3));
+    EXPECT_TRUE(ShouldAddReplica(config, 3));
   }
 }