[infinispan-issues] [JBoss JIRA] (ISPN-7111) Avoid using InetAddress.getLocalHost() in the tests

Dan Berindei (JIRA) issues at jboss.org
Thu Oct 13 05:16:01 EDT 2016


     [ https://issues.jboss.org/browse/ISPN-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Berindei updated ISPN-7111:
-------------------------------
              Status: Pull Request Sent  (was: Open)
    Git Pull Request: https://github.com/infinispan/infinispan/pull/4615


> Avoid using InetAddress.getLocalHost() in the tests
> ---------------------------------------------------
>
>                 Key: ISPN-7111
>                 URL: https://issues.jboss.org/browse/ISPN-7111
>             Project: Infinispan
>          Issue Type: Task
>          Components: Test Suite - Core
>    Affects Versions: 9.0.0.Alpha4
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>             Fix For: 9.0.0.Beta1
>
>
> Depending on the network, {{InetAddress.getLocalHost()}} can be quite slow. Some tests use it in a loop, via the {{org.jgroups.stack.IpAddress(port)}} constructor, and the core test suite can spend a lot of time doing this:
> {noformat}
> "testng-VersionAwareMarshallerTest" #17 prio=5 os_prio=0 tid=0x00007f8b54eb8000 nid=0x4300 runnable [0x00007f8ad9236000]
>    java.lang.Thread.State: RUNNABLE
> 	at java.net.Inet4AddressImpl.getLocalHostName(Native Method)
> 	at java.net.InetAddress.getLocalHost(InetAddress.java:1474)
> 	at org.jgroups.stack.IpAddress.setAddressToLocalHost(IpAddress.java:69)
> 	at org.jgroups.stack.IpAddress.<init>(IpAddress.java:90)
> 	at org.jgroups.stack.IpAddress.<init>(IpAddress.java:84)
> 	at org.infinispan.marshall.VersionAwareMarshallerTest.testMapMarshalling(VersionAwareMarshallerTest.java:164)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list