CRZbulabula commented on code in PR #1475:
URL: https://github.com/apache/ratis/pull/1475#discussion_r3329719212


##########
ratis-test/src/test/java/org/apache/ratis/shell/cli/sh/ElectionCommandIntegrationTest.java:
##########
@@ -150,13 +150,16 @@ public void testElectionStepDownCommand() throws 
Exception {
   void runTestElectionStepDownCommand(MiniRaftCluster cluster) throws 
Exception {
     final RaftServer.Division leader = RaftTestUtil.waitForLeader(cluster);
     String sb = getClusterAddress(cluster);
-    RaftServer.Division newLeader = cluster.getFollowers().get(0);
     final StringPrintStream out = new StringPrintStream();
     RatisShell shell = new RatisShell(out.getPrintStream());
-    Assertions.assertNotEquals(cluster.getLeader().getId(), newLeader.getId());
     Assertions.assertEquals(2, cluster.getFollowers().size());
-    int ret = shell.run("election", "stepDown", "-peers", sb.toString());
+    int ret = shell.run("election", "pause", "-peers", sb.toString(), 
"-address",
+        leader.getPeer().getAddress());
+    Assertions.assertEquals(0, ret);
+
+    ret = shell.run("election", "stepDown", "-peers", sb.toString());

Review Comment:
   Done. Removed the redundant `toString()` calls.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to