<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,<br>
The patch takes some code patterns from SSLSocketTemplate.java to
try to resolve the following issues:<br>
JDK-8171900: javax/net/ssl/SSLSession/SessionTimeOutTests.java
failed with "SSLHandshakeException: Remote host terminated the
handshake"<br>
JDK-8173142: javax/net/ssl/SSLSession/SessionTimeOutTests.java
fails with SocketException: Address already in use<br>
<br>
Besides the above issues, I also find two more problems.<br>
1. It is too late to set property javax.net.debug. Since the debug
flag is false, this problem is not exposed.<br>
<br>
2. In theory, the test can take multiple clients to connect to one
server, namely MAX_ACTIVE_CONNECTIONS [1] could be greater than
PORTS [2]. But this test execution would hang for this case.
Because the connections between the client side and server side
possibly are not matched if MAX_ACTIVE_CONNECTIONS is not a
multiple of PORTS.<br>
For example, a client wants to connect to a specified server for 3
times, however, the server can accept only 2 requests. And at the
meantime, another server are waiting for 3 connections, but the
client side send only 2 requests to it.<br>
Since MAX_ACTIVE_CONNECTIONS is equal to PORTS, the problem also
doesn't raise in practice, but that still be a bug in logic.<br>
<br>
Webrev: <a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Ejjiang/8171900/webrev.00/">http://cr.openjdk.java.net/~jjiang/8171900/webrev.00/</a><br>
<br>
[1] <a class="moz-txt-link-freetext"
href="http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l109">http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l109</a><br>
[2] <a class="moz-txt-link-freetext"
href="http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l78">http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l78</a><br>
<br>
Best regards,<br>
John Jiang<br>
</p>
</body>
</html>