RFR: JDK-8025211 - Intermittent test failure: java/net/DatagramSocket/PortUnreachable.java

Daniel Fuchs daniel.fuchs at oracle.com
Fri Nov 29 15:40:00 UTC 2013

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:
> Hi
> please oblige and review the following changes
> http://cr.openjdk.java.net/~msheppar/8025211/webrev/
> which address the issue raised in the bug
> https://bugs.openjdk.java.net/browse/JDK-8025211
> an intermittent failure occurs on some windows test machines.
> this replaces a Thread.sleep(5000) with explicit synchronization between
> sender
> and receiver via a CountDownLatch
> regards
> Mark

More information about the core-libs-dev mailing list