RFR: JDK-8025211 - Intermittent test failure: java/net/DatagramSocket/PortUnreachable.java
mark.sheppard at oracle.com
Fri Nov 29 16:10:20 UTC 2013
Thanks for the feedback.
That's a fair point about the Thread construction.
In addressing the issue, I took a minimalist approach and
mainly homed in on the Thread.sleep prior to the server send,
as the potential culprit.
As the intermittent failure is on the client DatagramSocket receive.
I think it's worth restructuring the test to avoid how it uses "this"
for thread construction.
On 29/11/2013 15:40, Daniel Fuchs wrote:
> Hi Mark,
> Using a CountDownLatch looks like the right thing to do
> At first I thought that the instance variables would need
> to be declared volatile - or synchronized - but since they're
> set before the new Thread is created and not changed afterwards
> I guess it's OK.
> It's a bit strange to pass 'this' to another thread before
> 'this' is fully constructed though. Well - it's just a test ;-)
> best regards,
> -- daniel
> On 11/29/13 3:21 PM, Mark Sheppard wrote:
>> please oblige and review the following changes
>> which address the issue raised in the bug
>> an intermittent failure occurs on some windows test machines.
>> this replaces a Thread.sleep(5000) with explicit synchronization between
>> and receiver via a CountDownLatch
More information about the core-libs-dev