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

Refactoring src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java to improve testability of rmiregistry

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • core-libs
    • b153

      It's hard to test rmiregistry and avoid "port in use" failure. Need to refactor RegistryImpl, to improve the testability.
      To improve the testability of RMI, adds the method "launch", so in a subprocess of tests it could simulate rmiregistry by calling this method, then retrieve the information of returned RegistryImpl and pass back to tests, for example, get the exact port where rmiregistry is listening and pass it back to tests, this is useful when input port is 0.

            mli Hamlin Li
            mli Hamlin Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: