[9] RFR of JDK-8085192: java/rmi/activation/Activatable tests fail intermittently due to "Port already in use"

Chris Hegarty chris.hegarty at oracle.com
Thu Sep 29 19:09:43 UTC 2016

On 29 Sep 2016, at 16:25, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> I have asked Hamlin to hold off on this for a day or so.  I have an 
> alternative proposal that eliminates the free port anti-pattern.

It is possible to use the inheritedChannel mechanism to have the rmid
process create the server channel on an ephemeral port and report it
back to the test, i.e. remove the free port pattern.


1) The port number is reported from rmid to the test over stdout.

2) All tests pass except CheckAnnotations.java, which looks for stderr
    ( see 3 below ). I think the stderr check can be removed, and the
    just check stdout.

3)  rmid, when using inheritChannel, redirects stderr to a tmp file, so
     it is not possible to get the processes stderr over the processes
     stderr pipe. I did’t find that this was an issue when testing ( other
     than having to clear out /tmp )

4) This could be expanded to other tests, outside of activation, to
     remove more usages of free port.

This is not yet complete, I just want to share the idea to see if it is a 
runner, or not.


More information about the core-libs-dev mailing list