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/10 18:51:42 UTC
[1/2] httpcomponents-core git commit: Tweaked SSL and ALPN test cases
to make them pass with Java 11
Repository: httpcomponents-core
Updated Branches:
refs/heads/master 43535e4b7 -> 11c9dc74a
Tweaked SSL and ALPN 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/cd60ffbf
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/cd60ffbf
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/cd60ffbf
Branch: refs/heads/master
Commit: cd60ffbf52b35c70fba30cf1bc80d7105678081c
Parents: 43535e4
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Mon Oct 8 12:18:49 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Oct 10 18:39:41 2018 +0200
----------------------------------------------------------------------
.../hc/core5/testing/nio/Http2ProtocolNegotiationTest.java | 6 +++---
.../java/org/apache/hc/core5/ssl/TestSSLContextBuilder.java | 7 ++++++-
2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/cd60ffbf/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
----------------------------------------------------------------------
diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
index ff0862b..13cad2b 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http2ProtocolNegotiationTest.java
@@ -254,10 +254,10 @@ public class Http2ProtocolNegotiationTest {
final HttpResponse response1 = message1.getHead();
Assert.assertThat(response1.getCode(), CoreMatchers.equalTo(HttpStatus.SC_OK));
- if (javaVersion < 9) {
- Assert.assertThat(response1.getVersion(), CoreMatchers.<ProtocolVersion>equalTo(HttpVersion.HTTP_1_1));
- } else {
+ if (javaVersion >= 9 && javaVersion < 11) {
Assert.assertThat(response1.getVersion(), CoreMatchers.<ProtocolVersion>equalTo(HttpVersion.HTTP_2));
+ } else {
+ Assert.assertThat(response1.getVersion(), CoreMatchers.<ProtocolVersion>equalTo(HttpVersion.HTTP_1_1));
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/cd60ffbf/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());
}
}
[2/2] httpcomponents-core git commit: add [openjdk11] to Travis build
matrix
Posted by ol...@apache.org.
add [openjdk11] to Travis build matrix
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/11c9dc74
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/11c9dc74
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/11c9dc74
Branch: refs/heads/master
Commit: 11c9dc74aa4c8a453c2207170251729e1a63a56c
Parents: cd60ffb
Author: Sean Sullivan <gi...@seansullivan.com>
Authored: Sun Oct 7 10:57:17 2018 -0700
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Oct 10 20:51:17 2018 +0200
----------------------------------------------------------------------
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/11c9dc74/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 88a4683..91508bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,8 +19,8 @@ sudo: false
jdk:
- openjdk7
- oraclejdk8
- - oraclejdk9
- oraclejdk10
+ - openjdk11
after_success:
- mvn clean cobertura:cobertura coveralls:report