From 64ca74933b7ee34c44d3a4328e44753461987741 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 10 Aug 2013 15:09:42 +0000 Subject: [PATCH] Found possible cause of thread interruption during test suite execution git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1512759 13f79535-47bb-0310-9956-ffa450edef68 --- .../conn/TestBasicHttpClientConnectionManager.java | 3 +-- .../http/impl/execchain/TestMainClientExec.java | 11 ----------- .../http/impl/execchain/TestMinimalClientExec.java | 11 ----------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java b/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java index 572ccf927..01be679d7 100644 --- a/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java +++ b/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicHttpClientConnectionManager.java @@ -49,7 +49,6 @@ import org.apache.http.conn.socket.LayeredConnectionSocketFactory; import org.apache.http.protocol.HttpContext; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; @@ -207,7 +206,7 @@ public class TestBasicHttpClientConnectionManager { Mockito.eq(route2), Mockito.any()); } - @Test @Ignore + @Test public void testLeaseExpired() throws Exception { final HttpHost target = new HttpHost("somehost"); final HttpRoute route = new HttpRoute(target); diff --git a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java index 4d71fd99e..6f79dd8cf 100644 --- a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java +++ b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMainClientExec.java @@ -427,17 +427,6 @@ public class TestMainClientExec { } } - @Test(expected=RequestAbortedException.class) - public void testExecConnectionRequestInterrupted() throws Exception { - final HttpRoute route = new HttpRoute(target); - final HttpClientContext context = new HttpClientContext(); - final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test")); - - Mockito.when(connRequest.get(Mockito.anyInt(), Mockito.any())) - .thenThrow(new InterruptedException()); - mainClientExec.execute(route, request, context, execAware); - } - @Test(expected=RequestAbortedException.class) public void testExecConnectionRequestFailed() throws Exception { final HttpRoute route = new HttpRoute(target); diff --git a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMinimalClientExec.java b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMinimalClientExec.java index 96dc4c6e4..cc5143130 100644 --- a/httpclient/src/test/java/org/apache/http/impl/execchain/TestMinimalClientExec.java +++ b/httpclient/src/test/java/org/apache/http/impl/execchain/TestMinimalClientExec.java @@ -254,17 +254,6 @@ public class TestMinimalClientExec { } } - @Test(expected=RequestAbortedException.class) - public void testExecConnectionRequestInterrupted() throws Exception { - final HttpRoute route = new HttpRoute(target); - final HttpClientContext context = new HttpClientContext(); - final HttpRequestWrapper request = HttpRequestWrapper.wrap(new HttpGet("http://bar/test")); - - Mockito.when(connRequest.get(Mockito.anyInt(), Mockito.any())) - .thenThrow(new InterruptedException()); - minimalClientExec.execute(route, request, context, execAware); - } - @Test(expected=RequestAbortedException.class) public void testExecConnectionRequestFailed() throws Exception { final HttpRoute route = new HttpRoute(target);