You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/10/08 10:19:02 UTC
httpcomponents-core git commit: Tweaked SSL test cases to make them
work with Java 11
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 31d85f101 -> 9f83b8461
Tweaked SSL test cases to make them work with Java 11
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9f83b846
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9f83b846
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9f83b846
Branch: refs/heads/master
Commit: 9f83b8461ae47d47c9aa7dab1e38379d2175658b
Parents: 31d85f1
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Mon Oct 8 12:18:49 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Mon Oct 8 12:18:49 2018 +0200
----------------------------------------------------------------------
.../java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9f83b846/httpcore5/src/test/java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/test/java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java b/httpcore5/src/test/java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java
index ba2db45..e3274f2 100644
--- a/httpcore5/src/test/java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java
+++ b/httpcore5/src/test/java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java
@@ -55,6 +55,7 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLPeerUnverifiedException;
@@ -494,6 +495,8 @@ public class TestSSLContextBuilder {
clientSocket.connect(new InetSocketAddress("localhost", localPort), TIMEOUT.toMillisIntBound());
clientSocket.setSoTimeout(TIMEOUT.toMillisIntBound());
clientSocket.startHandshake();
+ final InputStream inputStream = clientSocket.getInputStream();
+ Assert.assertEquals(-1, inputStream.read());
}
}
@@ -668,7 +671,7 @@ public class TestSSLContextBuilder {
if (isWindows()) {
thrown.expect(IOException.class);
} else {
- thrown.expect(SSLHandshakeException.class);
+ thrown.expect(SSLException.class);
}
final URL resource1 = getResource("/test-server.keystore");
@@ -712,6 +715,8 @@ public class TestSSLContextBuilder {
clientSocket.connect(new InetSocketAddress("localhost", localPort), TIMEOUT.toMillisIntBound());
clientSocket.setSoTimeout(TIMEOUT.toMillisIntBound());
clientSocket.startHandshake();
+ final InputStream inputStream = clientSocket.getInputStream();
+ Assert.assertEquals(-1, inputStream.read());
}
}