summaryrefslogtreecommitdiffstats
path: root/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-01-17 15:23:03 -0800
committerBrian Carlstrom <bdc@google.com>2013-01-17 15:26:46 -0800
commit39d69d058be0c1a4555aeed4a237c2af05ae39c6 (patch)
treeb06f381e503572a68d034143841ea2cf65fce0cb /luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
parent623754c8755b05bea57f06d1838cd7805c141e29 (diff)
downloadlibcore-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/ssl/SSLSocketTest.java')
-rw-r--r--luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java16
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();
}