Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10202

GMSJoinLeaveJUnitTest fails on java 17 because InetAddress.toString format has changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • tests

    Description

      The following failure is caused by java 17 adding "/<unresolved>". Looking at the jdk 8 source of InetSocketAddress.toString if it had a instance that was unresolved it just returned a String with hostName:port. Otherwise it was address:port. Jdk 17 now tacks on "/<unresolved>" to the hostName in this toString (see: https://github.com/openjdk/jdk17/blob/master/src/java.base/share/classes/java/net/InetSocketAddress.java)

      GMSJoinLeaveJUnitTest > testJoinFailureWhenNoLocator FAILED
          java.lang.AssertionError: 
          Expecting throwable message:
            "Unable to join the distributed system. Could not contact any of the locators: [locator1/<unresolved>:12345, locator2/<unresolved>:54321]"
          to contain:
            "Could not contact any of the locators: [locator1:12345, locator2:54321]"
          but did not.
      
          Throwable that failed the check: org.apache.geode.distributed.internal.membership.api.MembershipConfigurationException: Unable to join the distributed system. Could not contact any of the locators: [locator1/<unresolved>:12345, locator2/<unresolved>:54321]
      

      Attachments

        Issue Links

          Activity

            People

              dschneider Darrel Schneider
              dschneider Darrel Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: