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

Alexander Shraer commented on ZOOKEEPER-1603:
---------------------------------------------

I'm not sure whats going on, but I tried running the same thing without 
ZooKeeper. It works for me on linux:


import java.net.*;
import java.util.*;

public class NetTest {

    public static void main(String []k){
        try {
            InetSocketAddress addr = 
InetSocketAddress.createUnresolved("10.10.10.5", 1234);
            InetAddress[] inetAddresses = 
InetAddress.getAllByName(addr.getHostName());

        int size = 4;
        ArrayList<InetSocketAddress> serverAddresses = new 
ArrayList<InetSocketAddress>();
        while (size > 0) {
            serverAddresses.add(InetSocketAddress.createUnresolved("10.10.10." 
+ size, 1234 + size));
            --size;
        }
        ArrayList<InetSocketAddress>  tmpList = new 
ArrayList<InetSocketAddress>();
        for (InetSocketAddress address : serverAddresses) {
            InetAddress resolvedAddresses[] = InetAddress.getAllByName(address
                    .getHostName());
            for (InetAddress resolvedAddress : resolvedAddresses) {
                tmpList.add(new InetSocketAddress(resolvedAddress
                        .getHostAddress(), address.getPort()));
            }
        }
        for (InetSocketAddress addr1: tmpList) {
           System.out.println(addr1);
        }
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}

                
> StaticHostProviderTest testUpdateClientMigrateOrNot hangs
> ---------------------------------------------------------
>
>                 Key: ZOOKEEPER-1603
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1603
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 3.5.0
>            Reporter: Patrick Hunt
>            Assignee: Alexander Shraer
>            Priority: Blocker
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1603.patch
>
>
> StaticHostProviderTest method testUpdateClientMigrateOrNot hangs forever.
> On my laptop getHostName for 10.10.10.* takes 5+ seconds per call. As a 
> result this method effectively runs forever.
> Every time I run this test it hangs. Consistent.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to