On Wed, 2016-06-15 at 01:03 -0700, Gary Gregory wrote: > On Tue, Jun 14, 2016 at 1:46 AM, Oleg Kalnichevski <[email protected]> wrote: > > > On Mon, 2016-06-13 at 14:22 -0700, Gary Gregory wrote: > > > On Mon, Jun 13, 2016 at 10:16 AM, Oleg Kalnichevski <[email protected]> > > > wrote: > > > > ... > > > > > > Gary > > > > Could you please add this line prior to the assert (See patch attached) > > > > and send me the stack trace? > > > > > > --- > > > > cause.printStackTrace(); > > > > > > > > > > Here you go: > > > > > > java.lang.IllegalStateException > > > at > > > > > org.apache.http.nio.client.integration.TestHttpAsyncPrematureTermination$7.responseReceived(TestHttpAsyncPrematureTermination.java:273) > > > at > > > > > org.apache.http.impl.nio.client.MainClientExec.responseReceived(MainClientExec.java:315) > > > at > > > > Thanks, Gary > > > > As bizarre as it may sound it looks like 'stuff.invalid' hostname does > > resolve to a valid address on your system. > > > > I tweaked the test case to use '0.0.0.0' instead of '.invalid' hostname > > to simulate refused connection exception. > > > > Could you please try building and running the tests of the latest > > snapshot? > > > > Hi Oleg, > > The latest from the 4.1.x branch gives me (mvn clean test): > > testConnectionRequestFailure(org.apache.http.nio.client.integration.TestHttpAsyncPrematureTermination) > Time elapsed: 0.036 sec <<< FAILURE! > java.lang.AssertionError: Unexpected cause: java.lang.IllegalStateException > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.assertTrue(Assert.java:41) > at > org.apache.http.nio.client.integration.TestHttpAsyncPrematureTermination.testConnectionRequestFailure(TestHttpAsyncPrematureTermination.java:309) > > I have: > > URL: > https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/branches/4.1.x > Relative URL: ^/httpcomponents/httpasyncclient/branches/4.1.x > Repository Root: https://svn.apache.org/repos/asf > Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68 > Revision: 1748513 > Node Kind: directory > Schedule: normal > Last Changed Author: olegk > Last Changed Rev: 1748358 > Last Changed Date: 2016-06-14 01:42:54 -0700 (Tue, 14 Jun 2016) > > Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; > 2015-11-10T08:41:47-08:00) > Maven home: E:\Java\apache-maven-3.3.9 > Java version: 1.8.0_91, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.8.0_91\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos" > > If I add "e.printStackTrace();" before the failing JUnit assertion, I get: > > Running > org.apache.http.nio.client.integration.TestHttpAsyncPrematureTermination > java.util.concurrent.ExecutionException: java.lang.IllegalStateException > at
That basically means that '0.0.0.0' address resolves to local host on your system. This makes no sense. Could you please change the request URL in the test from "http://0.0.0.0/" to "http://0.0.0.0:000/" and try one more time? --- final HttpGet get = new HttpGet("http://0.0.0.0:000/"); --- Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
