hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1761331 - in /httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration: Http2IntegrationTest.java Http2TestClient.java
Date Sun, 18 Sep 2016 13:57:15 GMT
Author: olegk
Date: Sun Sep 18 13:57:15 2016
New Revision: 1761331

URL: http://svn.apache.org/viewvc?rev=1761331&view=rev
Log:
Attempt to make HTTP/2 integration tests to work on the Jenkins server

Modified:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2TestClient.java

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java?rev=1761331&r1=1761330&r2=1761331&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
Sun Sep 18 13:57:15 2016
@@ -156,7 +156,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start();
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("GET", createRequestURI(serverEndpoint,
"/hello"));
@@ -256,7 +256,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start();
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("GET", createRequestURI(serverEndpoint,
"/"));
@@ -307,7 +307,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start();
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("POST", createRequestURI(serverEndpoint,
"/hello"));
@@ -445,7 +445,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start();
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         client.start();
@@ -480,7 +480,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start(H2Config.custom().setInitialWindowSize(16).build());
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("GET", createRequestURI(serverEndpoint,
"/"));
@@ -539,7 +539,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start();
 
         client.start();
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("POST", createRequestURI(serverEndpoint,
"/echo"));
@@ -645,7 +645,7 @@ public class Http2IntegrationTest extend
                 .setInitialWindowSize(512)
                 .build());
 
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final HttpRequest request1 = new BasicHttpRequest("POST", createRequestURI(serverEndpoint,
"/hello"));
@@ -717,7 +717,7 @@ public class Http2IntegrationTest extend
 
         });
 
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final Future<Message<HttpResponse, String>> future1 = streamEndpoint.execute(
@@ -791,7 +791,7 @@ public class Http2IntegrationTest extend
 
         client.start(H2Config.custom().setPushEnabled(true).build());
 
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final Future<Message<HttpResponse, String>> future1 = streamEndpoint.execute(
@@ -829,7 +829,7 @@ public class Http2IntegrationTest extend
         final InetSocketAddress serverEndpoint = server.start(H2Config.custom().setMaxConcurrentStreams(20).build());
 
         client.start(H2Config.custom().setMaxConcurrentStreams(20).build());
-        final Future<ClientCommandEndpoint> connectFuture = client.connect(serverEndpoint,
5000);
+        final Future<ClientCommandEndpoint> connectFuture = client.connect("localhost",
serverEndpoint.getPort(), 5000);
         final ClientCommandEndpoint streamEndpoint = connectFuture.get();
 
         final Queue<Future<Message<HttpResponse, Void>>> queue = new LinkedList<>();

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2TestClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2TestClient.java?rev=1761331&r1=1761330&r2=1761331&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2TestClient.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2TestClient.java
Sun Sep 18 13:57:15 2016
@@ -117,6 +117,13 @@ public class Http2TestClient {
         return connect(address, connectTimeout, null, null);
     }
 
+    public Future<ClientCommandEndpoint> connect(
+            final String hostname,
+            final int port,
+            final int connectTimeout) throws InterruptedException {
+        return connect(new InetSocketAddress(hostname, port), connectTimeout, null, null);
+    }
+
     private AsyncPushConsumer createHandler(final HttpRequest request) throws HttpException,
IOException {
 
         final HttpHost authority;



Mime
View raw message