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

Re-examine getFreePort method in test infrastructure library

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b05

      Backports

        Description

        The getFreePort() method in the following test infrastructure classes need to be re-examined:

        test/lib/jdk/test/lib/Utils.java
        test/jdk/lib/testlibrary/jdk/testlibrary/Utils.java

        The initial sleep makes it too slow for tests that need to invoke it hundreds of times. The exception handling is also confusing as getLocalPort() can never return -1.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mli Hamlin Li
                Reporter:
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: