RFR: JDK-8025211 - Intermittent test failure: java/net/DatagramSocket/PortUnreachable.java
mark.sheppard at oracle.com
Fri Nov 29 17:17:28 UTC 2013
thanks for the replies.
yes, 'tis a possibility, and it appears to work ok as a test, as it
avoids the sender's Thread.sleep creating a race condition, such that
the send doesn't happen prior to the timeout of the client receive.
The context of the test appears to be creating conditions
such that an ICMP PortUnreachable event is generated,
which caused a close a particular version of windows.
The test is for socket closed scenario, afaik
tested on the errant test machine with consistent success.
On 29/11/2013 16:41, Daniel Fuchs wrote:
> On 11/29/13 5:19 PM, Alan Bateman wrote:
>> On 29/11/2013 14:21, 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 sender
>>> and receiver via a CountDownLatch
>> (cc'ing net-dev)
>> Would an alternative here be to just get rid of the server thread (do
>> both the send + receive on the main thread)?
> Hmm... The message sent by the server is short enough so that it
> should be stored in the client's socket buffer and received later
> by the client, even though the client is not yet blocked waiting
> in clientSock.receive() when the message is sent.
> That might work.
> Unless multi-threading was relevant to the configuration being
> -- daniel
More information about the core-libs-dev