Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337564

java/net/Inet6Address/PreferIPv6AddressesTest.java fails in an IPv6 only environment

XMLWordPrintable

      This test revolves google.com which retrieves (or may retrieve) IPv4 and IPv6 addresses
      The test system is configured for IPv6 only i.e. IPv4 stack and configurations disable (except for OL9 systems which still have IPv4 stack but pure IPv6 configuration)

      processing of IPv4 addresses should not be dependent on IPv4 stack enablement.

      command: main -Djava.net.preferIPv6Addresses=false PreferIPv6AddressesTest
      reason: User specified action: run main/othervm -Djava.net.preferIPv6Addresses=false PreferIPv6AddressesTest
      started: Fri May 31 19:00:19 GMT+07:00 2024
      Mode: othervm [/othervm specified]
      finished: Fri May 31 19:00:19 GMT+07:00 2024
      elapsed time (seconds): 0.12
      ----------configuration:(0/0)----------
      ----------System.out:(2/109)----------
      IPv6 supported: true
      Addresses: [www.google.com/142.251.220.4, www.google.com/2404:6800:4005:802:0:0:0:2004]
      ----------System.err:(12/865)----------
      java.lang.RuntimeException: Expected class java.net.Inet4Address, got class java.net.Inet6Address
      at PreferIPv6AddressesTest.assertLoopbackAddress(PreferIPv6AddressesTest.java:115)
      at PreferIPv6AddressesTest.main(PreferIPv6AddressesTest.java:83)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1575)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected class java.net.Inet4Address, got class java.net.Inet6Address
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected class java.net.Inet4Address, got class java.net.Inet6Address

            msheppar Mark Sheppard
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: