diff options
author | Brian Carlstrom <bdc@google.com> | 2013-01-17 15:23:03 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-01-17 15:26:46 -0800 |
commit | 39d69d058be0c1a4555aeed4a237c2af05ae39c6 (patch) | |
tree | b06f381e503572a68d034143841ea2cf65fce0cb /luni/src/test/java/libcore/javax/net | |
parent | 623754c8755b05bea57f06d1838cd7805c141e29 (diff) | |
download | libcore-39d69d058be0c1a4555aeed4a237c2af05ae39c6.tar.gz libcore-39d69d058be0c1a4555aeed4a237c2af05ae39c6.tar.bz2 libcore-39d69d058be0c1a4555aeed4a237c2af05ae39c6.zip |
Make test_SSLSocket_getSupportedCipherSuites_connect continue to next supported cipher suite on exception
Change-Id: I251c96bd033fa14a01880df20eba7f7626bfccb3
Diffstat (limited to 'luni/src/test/java/libcore/javax/net')
-rw-r--r-- | luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java index 342c92ffb..0aa254d2d 100644 --- a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java +++ b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java @@ -130,6 +130,7 @@ public class SSLSocketTest extends TestCase { cipherSuites = cs.toArray(new String[cs.size()]); } + StringBuilder error = new StringBuilder(); for (String cipherSuite : cipherSuites) { boolean errorExpected = StandardNames.IS_RI && cipherSuite.endsWith("_SHA256"); try { @@ -182,13 +183,20 @@ public class SSLSocketTest extends TestCase { assertFalse(errorExpected); } catch (Exception maybeExpected) { if (!errorExpected) { - throw new Exception("Problem trying to connect cipher suite " + cipherSuite - + " client=" + clientProvider - + " server=" + serverProvider, - maybeExpected); + String message = ("Problem trying to connect cipher suite " + cipherSuite + + " client=" + clientProvider + + " server=" + serverProvider); + System.out.println(message); + maybeExpected.printStackTrace(); + error.append(message); + error.append('\n'); } } } + if (error.length() != 0) { + throw new Exception("One or more problems in " + + "test_SSLSocket_getSupportedCipherSuites_connect:\n" + error); + } c.close(); } |