RFR of JDK-8085192: java/rmi/activation/Activatable tests fail intermittently due to "Port already in use"
chris.hegarty at oracle.com
Mon Oct 3 15:42:36 UTC 2016
Here is an updated version of this ( ready for review ):
Changes from previous:
1) Updated Activation/rmid to NOT redirect stderr, if an
implementation specific system property is used ( we can
discuss the name )
2) For now, I added createRMIDOnEphemeralPort, rather than
change the current implementation, as it is being used in
other places. We can revert this once other usages are
updated and verified.
On 29/09/16 20:09, Chris Hegarty wrote:
> 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