[ https://issues.apache.org/jira/browse/HBASE-21949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16783162#comment-16783162 ]
maoling commented on HBASE-21949: --------------------------------- - I do a regression for this UT(run it 2000 times), what i got faied at the Line-322(Test 3): *java.lang.AssertionError:* *Expected :-3334* *Actual :8888* - for your case, all the four sub-tests may have the possibility of port conflict. - what you mean is that:*assertTrue((defaultClientPort + j) <= clientPortListInCluster.get(i).intValue())* ? IMHO, I prefer to the solution when finding the port conflict,just ignore and pass this sub-test,because the expect port has no number releation with the actual port *e.g* Test 3 int [] clientPortList3 = \{3333, -3334, 3335, 0}; when the port conflict,List<Integer> clientPortListInCluster = cluster3.getClientPortList(); the element of clientPortListInCluster is still \{3333, -3334, 3335, 0}; look at the specific code in the *MiniZooKeeperCluster#startup* Line248-Line253,it will return -1, not *selectClientPort.* > Fix flaky test > TestHBaseTestingUtility.testMiniZooKeeperWithMultipleClientPorts > ------------------------------------------------------------------------------- > > Key: HBASE-21949 > URL: https://issues.apache.org/jira/browse/HBASE-21949 > Project: HBase > Issue Type: Bug > Reporter: Guanghao Zhang > Assignee: maoling > Priority: Major > Fix For: 3.0.0, 2.2.0, 2.3.0 > > Attachments: HBASE-21949-branch-2.2.patch > > > Found this when run ut for branch-2.2. It is easy to port conflict. > TestHBaseTestingUtility.testMiniZooKeeperWithMultipleClientPorts:299 > expected:<8889> but was:<8888> -- This message was sent by Atlassian JIRA (v7.6.3#76005)