[12] RFR 8187522: sun/net/ftp/FtpURLConnectionLeak.Java timed out

Chris Yin xu.y.yin at oracle.com
Thu Oct 11 08:45:35 UTC 2018


Please review below small change to fix test sun/net/ftp/FtpURLConnectionLeak.Java, thanks

Besides the original timeout issue, looks like the test not working as expected even the results is pass. Per test description, we expect FileNotFoundException and then verify connection closed, but look through recent test run log, it’s actually got “sun.net.ftp.FtpLoginException: Invalid username/password” and this exception been caught in IOException block coincidentally, so the test result is pass, but it never hit FileNotFoundException. The fix change will remove IOException catch block and close server socket in close() of try-with-resouce to avoid possible invalid exception catch and connection issue, also ftp 220 response message was modified to allow FtpClient working correctly (I leave the corrupted message style as it is since looks like it will be used to test JDK-8151586)

bug: https://bugs.openjdk.java.net/browse/JDK-8187522
webrev: http://cr.openjdk.java.net/~xyin/8187522/webrev.00/

Regards,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20181011/339d007c/attachment.html>


More information about the net-dev mailing list