Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7111

Avoid using InetAddress.getLocalHost() in the tests

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 9.0.0.Beta1
    • 9.0.0.Alpha4
    • Test Suite
    • None

    Description

      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:

      "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)
      

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: