zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] anmolnar commented on a change in pull request #832: ZOOKEEPER-2503:do a hard constraints on the number of myid which must be between 1 and 255
Date Mon, 04 Mar 2019 22:45:43 GMT
anmolnar commented on a change in pull request #832: ZOOKEEPER-2503:do a hard constraints on
the number of myid which must be between 1 and 255
URL: https://github.com/apache/zookeeper/pull/832#discussion_r262276981
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java
 ##########
 @@ -436,6 +438,35 @@ public void testElectionFraud() throws IOException, InterruptedException
{
         Assert.assertTrue("falseLeader never rejoins the quorum", foundFollowing);
     }
 
+    @Test
+    public void testBadMyId() throws Exception {
+        ClientBase.setupTestEnv();
+
+        final int CLIENT_PORT_QP1 = PortAssignment.unique();
+        List<Integer> invalidMyidList = new ArrayList<>();
+        invalidMyidList.add(-1);
 
 Review comment:
   You should consider using JUnit's parameterised test feature to run the same test with
multiple myids.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message