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/12/07 09:27:30 UTC
httpcomponents-core git commit: Tweaked SSL test cases to make them
pass with Java 11
Repository: httpcomponents-core
Updated Branches:
refs/heads/4.4.x d4e8e71e5 -> 6e7d82fbb
Tweaked SSL test cases to make them pass 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/6e7d82fb
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/6e7d82fb
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/6e7d82fb
Branch: refs/heads/4.4.x
Commit: 6e7d82fbb2513ceafad730db608d8378d685b69a
Parents: d4e8e71
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Fri Dec 7 10:25:12 2018 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri Dec 7 10:25:12 2018 +0100
----------------------------------------------------------------------
.../test/java/org/apache/http/ssl/TestSSLContextBuilder.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6e7d82fb/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
----------------------------------------------------------------------
diff --git a/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java b/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
index 7f3d544..3f00b21 100644
--- a/httpcore/src/test/java/org/apache/http/ssl/TestSSLContextBuilder.java
+++ b/httpcore/src/test/java/org/apache/http/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.SSLPeerUnverifiedException;
import javax.net.ssl.SSLServerSocket;
@@ -485,6 +486,8 @@ public class TestSSLContextBuilder {
clientSocket.connect(new InetSocketAddress("localhost", localPort), TIMEOUT);
clientSocket.setSoTimeout(TIMEOUT);
clientSocket.startHandshake();
+ final InputStream inputStream = clientSocket.getInputStream();
+ Assert.assertEquals(-1, inputStream.read());
} finally {
clientSocket.close();
}
@@ -669,7 +672,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");