From 91b74f4fdc8a578bb41fdc08531f0d407586d797 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Tue, 26 May 2015 18:42:08 +0300 Subject: [PATCH] 8078823: javax/net/ssl/ciphersuites/DisabledAlgorithms.java fails intermittently Reviewed-by: xuelei --- .../net/ssl/ciphersuites/DisabledAlgorithms.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java b/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java index 97cedaeaa59..f1fd67d9b38 100644 --- a/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java +++ b/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java @@ -103,6 +103,8 @@ public class DisabledAlgorithms { default: throw new RuntimeException("Wrong parameter: " + args[0]); } + + System.out.println("Test passed"); } /* @@ -127,7 +129,6 @@ public class DisabledAlgorithms { } } - server.stop(); while (server.isRunning()) { sleep(); } @@ -223,11 +224,19 @@ public class DisabledAlgorithms { } 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 @@ public class DisabledAlgorithms { stopped = true; if (!ssocket.isClosed()) { try { + System.out.println("Server: close socket"); ssocket.close(); } catch (IOException e) { System.out.println("Server: close: " + e);