hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14784) Port conflict is not resolved in HBaseTestingUtility.randomFreePort()
Date Sun, 08 Nov 2015 20:50:11 GMT

    [ https://issues.apache.org/jira/browse/HBASE-14784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14995796#comment-14995796
] 

Hudson commented on HBASE-14784:
--------------------------------

FAILURE: Integrated in HBase-Trunk_matrix #447 (See [https://builds.apache.org/job/HBase-Trunk_matrix/447/])
HBASE-14784 Port conflict is not resolved in (tedyu: rev 6b9d30d9133ae011f6e76369efc1ee4c0a66465d)
* hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java


> Port conflict is not resolved in HBaseTestingUtility.randomFreePort()
> ---------------------------------------------------------------------
>
>                 Key: HBASE-14784
>                 URL: https://issues.apache.org/jira/browse/HBASE-14784
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.1.2
>            Reporter: Youngjoon Kim
>            Assignee: Youngjoon Kim
>            Priority: Minor
>             Fix For: 2.0.0, 1.2.0, 1.3.0
>
>         Attachments: HBASE-14784.patch
>
>
> If takenRandomPorts.contains(port) == true, it means port conflict, so randomFreePort()
should rerun the loop. But continue statement leads to exit the loop, because port != 0.
> {code:title=hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java}
> public static int randomFreePort() {
>   int port = 0; 
>   do { 
>     port = randomPort();
>     if (takenRandomPorts.contains(port)) {
>       continue;
>     }    
>     takenRandomPorts.add(port);
>     ...
>   } while (port == 0);
>   return port;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message