hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1808441 - in /httpcomponents/httpasyncclient/branches/4.1.x: ./ httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/ httpasyncclient/src/test/java/org/apache/http/nio/client/integration/
Date Fri, 15 Sep 2017 10:00:32 GMT
Author: olegk
Date: Fri Sep 15 10:00:31 2017
New Revision: 1808441

URL: http://svn.apache.org/viewvc?rev=1808441&view=rev
Log:
Upgraded HttpCore dependency to version 4.4.7

Modified:
    httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/TestPoolingHttpClientAsyncConnectionManager.java
    httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
    httpcomponents/httpasyncclient/branches/4.1.x/pom.xml

Modified: httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/TestPoolingHttpClientAsyncConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/TestPoolingHttpClientAsyncConnectionManager.java?rev=1808441&r1=1808440&r2=1808441&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/TestPoolingHttpClientAsyncConnectionManager.java
(original)
+++ httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/impl/nio/conn/TestPoolingHttpClientAsyncConnectionManager.java
Fri Sep 15 10:00:31 2017
@@ -29,6 +29,7 @@ package org.apache.http.impl.nio.conn;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.Calendar;
+import java.util.concurrent.CancellationException;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
@@ -234,7 +235,7 @@ public class TestPoolingHttpClientAsyncC
         future.get();
     }
 
-    @Test
+    @Test(expected = CancellationException.class)
     public void testRequestConnectionCancelled() throws Exception {
         final HttpHost target = new HttpHost("localhost");
         final HttpRoute route = new HttpRoute(target);
@@ -254,7 +255,7 @@ public class TestPoolingHttpClientAsyncC
 
         Assert.assertTrue(future.isDone());
         Assert.assertTrue(future.isCancelled());
-        Assert.assertNull(future.get());
+        future.get();
     }
 
     @Test

Modified: httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java?rev=1808441&r1=1808440&r2=1808441&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
(original)
+++ httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
Fri Sep 15 10:00:31 2017
@@ -27,6 +27,7 @@
 package org.apache.http.nio.client.integration;
 
 import java.io.IOException;
+import java.util.concurrent.CancellationException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
@@ -382,7 +383,11 @@ public class TestHttpAsyncPrematureTermi
         };
 
         final Future<?> future = this.httpclient.execute(producer, consumer, null,
null);
-        future.get();
+        try {
+            future.get();
+            Assert.fail("CancellationException expected");
+        } catch (final CancellationException expected) {
+        }
 
         connMgr.shutdown(1000);
 

Modified: httpcomponents/httpasyncclient/branches/4.1.x/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/pom.xml?rev=1808441&r1=1808440&r2=1808441&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/branches/4.1.x/pom.xml (original)
+++ httpcomponents/httpasyncclient/branches/4.1.x/pom.xml Fri Sep 15 10:00:31 2017
@@ -66,7 +66,7 @@
   <properties>
     <maven.compiler.source>1.6</maven.compiler.source>
     <maven.compiler.target>1.6</maven.compiler.target>
-    <httpcore.version>4.4.6</httpcore.version>
+    <httpcore.version>4.4.7</httpcore.version>
     <httpclient.version>4.5.3</httpclient.version>
     <commons-logging.version>1.2</commons-logging.version>
     <commons-io.version>2.4</commons-io.version>



Mime
View raw message