You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/09/15 15:17:47 UTC

[GitHub] [iotdb] Beyyes commented on a diff in pull request #7335: [IOTDB-4418] One-member group conf change using RatisConsensus

Beyyes commented on code in PR #7335:
URL: https://github.com/apache/iotdb/pull/7335#discussion_r972120913


##########
consensus/src/test/java/org/apache/iotdb/consensus/ratis/RatisConsensusTest.java:
##########
@@ -185,6 +185,21 @@ public void crashAndStart() throws Exception {
     doConsensus(servers.get(0), gid, 10, 210);
   }
 
+  @Test
+  public void oneMemberGroupChange() throws Exception {
+    List<Peer> original = peers.subList(0, 1);
+
+    servers.get(0).createPeer(gid, original);
+    doConsensus(servers.get(0), gid, 10, 10);
+
+    servers.get(1).createPeer(gid, peers.subList(0, 2));
+    servers.get(0).addPeer(gid, peers.get(1));
+    servers.get(0).removePeer(gid, peers.get(0));

Review Comment:
   both `servers.get(0).removePeer(gid, peers.get(0));` and `servers.get(1).removePeer(gid, peers.get(0));` should be tested.
   
   ![image](https://user-images.githubusercontent.com/6756545/190441770-6484e205-ad86-40fd-8f97-514e321ecfae.png)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org