8078823: javax/net/ssl/ciphersuites/DisabledAlgorithms.java fails intermittently
authorasmotrak
Tue, 26 May 2015 18:42:08 +0300
changeset 30798 e83745d58046
parent 30797 9cf3d0361db4
child 30807 c9db749674df
8078823: javax/net/ssl/ciphersuites/DisabledAlgorithms.java fails intermittently Reviewed-by: xuelei
jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
--- a/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java	Tue May 26 18:31:21 2015 +0400
+++ b/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java	Tue May 26 18:42:08 2015 +0300
@@ -103,6 +103,8 @@
             default:
                 throw new RuntimeException("Wrong parameter: " + args[0]);
         }
+
+        System.out.println("Test passed");
     }
 
     /*
@@ -127,7 +129,6 @@
                 }
             }
 
-            server.stop();
             while (server.isRunning()) {
                 sleep();
             }
@@ -223,11 +224,19 @@
                 } catch (SSLHandshakeException e) {
                     System.out.println("Server: run: " + e);
                     sslError = true;
+                    stopped = true;
                 } catch (IOException e) {
                     if (!stopped) {
-                        System.out.println("Server: run: " + e);
+                        System.out.println("Server: run: unexpected exception: "
+                                + e);
                         e.printStackTrace();
                         otherError = true;
+                        stopped = true;
+                    } else {
+                        System.out.println("Server: run: " + e);
+                        System.out.println("The exception above occurred "
+                                    + "because socket was closed, "
+                                    + "please ignore it");
                     }
                 }
             }
@@ -260,6 +269,7 @@
             stopped = true;
             if (!ssocket.isClosed()) {
                 try {
+                    System.out.println("Server: close socket");
                     ssocket.close();
                 } catch (IOException e) {
                     System.out.println("Server: close: " + e);