RFR: 8262438: sun/security/ssl/SSLLogger/LoggingFormatConsistency.java failed with "SocketException: Socket is closed" [v2]
Daniel Fuchs
dfuchs at openjdk.java.net
Tue Mar 2 15:16:49 UTC 2021
On Tue, 2 Mar 2021 15:08:01 GMT, Evan Whelan <ewhelan at openjdk.org> wrote:
>> Hi all,
>>
>> Please review my test fix relating to JDK-8262438
>>
>> This patch introduces as Thread.sleep at the start of each iteration which creates a new test jvm.
>> This allows the server socket sufficient time to release the previous connection and allows the port to be used again.
>>
>> I also refactored the behaviour for when the exitCode is not 0, allowing for an easier to read output.
>> An incorrect HttpsUrlConnection.disconnect() was also removed.
>>
>> The test was ran 100 times on all platforms and no failures were seen.
>>
>> Thanks,
>> Evan
>
> Evan Whelan has updated the pull request incrementally with two additional commits since the last revision:
>
> - 8262438: Stream operations on new lines
> - 8262438: Ensure all streams are emptied in socket connection
test/jdk/sun/security/ssl/SSLLogger/LoggingFormatConsistency.java line 133:
> 131: out.flush();
> 132: } finally {
> 133: socket.getInputStream().readAllBytes();
This will cause the server side to block until the client closes the socket. Is that what you really want to do? (It may be - but if the client is a regular HTTP client (HttpURLConnection / HttpClient) it will not close the connection until its keep-alive delay (may be up to 20mins) is expired.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2749
More information about the security-dev
mailing list