test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java
changeset 55411 328d4a455e4b
parent 54816 b27f33bef884
--- a/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java	Fri Jun 14 10:02:57 2019 +0200
+++ b/test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java	Fri Jun 14 12:19:14 2019 -0700
@@ -53,6 +53,9 @@
 
     @Override
     protected void runServerApplication(SSLSocket socket) throws Exception {
+        // Set SO_LINGER in case of slow socket
+        socket.setSoLinger(true, 10);
+
         // here comes the test logic
         InputStream sslIS = socket.getInputStream();
         OutputStream sslOS = socket.getOutputStream();
@@ -81,6 +84,9 @@
      * @see #isCustomizedClientConnection()
      */
     protected void runClientApplication(SSLSocket socket) throws Exception {
+        // Set SO_LINGER in case of slow socket
+        socket.setSoLinger(true, 10);
+
         socket.setEnabledProtocols(new String[] {"TLSv1.3"});
         InputStream sslIS = socket.getInputStream();
         OutputStream sslOS = socket.getOutputStream();