RFR 8085575_8130657, misc fixes for a few of java.net intermittent failures
Felix Yang
felix.yang at oracle.com
Mon Sep 26 14:02:58 UTC 2016
Hi Daniel,
thanks for figuring out this mistake. Put it before return to avoid unclosed socket. Also updated style as Langer suggested.
Updated web rev:
http://cr.openjdk.java.net/~xiaofeya/8085575_8130657/webrev.01/
Thanks,
Felix
> On 26 Sep 2016, at 5:29 PM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
>
> Hi Felix,
>
> InheritHandle.java:
>
> 79 } finally {
> 80 try {
> 81 ss.close();
> 82 } catch (IOException e) {
> 83 e.printStackTrace();
> 84 }
> 85 }
>
> Is finally the right construct here? It seems to me that
> you're changing the logic of the test. I would expect the
> socket to be closed only when an exception is received?
>
> Otherwise you're going to close the socket again at
> line 94
>
> 94 ss.close();
>
> which looks strange to me...
>
> best regards,
>
> -- daniel
>
>
> On 26/09/16 08:56, Felix Yang wrote:
>> Hi there,
>>
>> please review following patch to a few of java.net tests.
>>
>> Bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8085575
>>
>> https://bugs.openjdk.java.net/browse/JDK-8130657
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~xiaofeya/8085575_8130657/webrev.00/
>>
>> Add retry for java/net/Socket/InheritHandle.java. Though it may be
>> unable to resolve all BindException ( I suppose it is the nature of such
>> close-reuse scenarios), it will be helpful to avoid failures from
>> asynchronized close, which has been observed especially on Windows. Also
>> some misc changes on other two tests.
>>
>>
>> Thanks,
>>
>> Felix
>>
>
More information about the net-dev
mailing list