hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject RC called off; Re: [VOTE] Release HttpComponents Client 4.4 based on RC1
Date Mon, 26 Jan 2015 20:21:47 GMT
On Mon, 2015-01-26 at 15:09 -0500, Gary Gregory wrote:
> On Mon, Jan 26, 2015 at 8:45 AM, Oleg Kalnichevski <olegk@apache.org> wrote:
> 
> > On Mon, 2015-01-26 at 08:03 -0500, Gary Gregory wrote:
> > > On Mon, Jan 26, 2015 at 4:11 AM, Oleg Kalnichevski <olegk@apache.org>
> > wrote:
> > >
> > > > On Sat, 2015-01-24 at 14:33 -0500, Gary Gregory wrote:
> > > > > Running 'mvn test' I get:
> > > > >
> > > > > Failed tests:
> > > > >   TestHttpRoute.testTargetHostNormalizationAddress:619
> > > > > expected:<[localhost]> but was:<[127.0.0.1]>
> > > > >
> > > > > Using:
> > > > >
> > > >
> > > > Gary
> > > >
> > > > This is clearly not a defect, but what appears to be Windows specific
> > > > behavior.
> > > >
> > >
> > > If you say so, I am only testing on Windows. There is no way for me to
> > know
> > > or tell that this is Windows specific. I see you removed:
> > >
> > > Assert.assertEquals("localhost", targetHost.getHostName());
> > >
> > > If this is expected to pass on non-Windows then perhaps the assert should
> > > be in a special test method with a JUnit Assume that only passes on
> > > non-Windows.
> > >
> > > Or is the behavior of the method "underfined" WRT to 'transformations'?
> > >
> > > Did the behavior change between releases? Is this going to be a
> > > compatibility issue?
> > >
> >
> > I do not think so. The problem stems from platform dependent results of
> > resolving 127.0.0.1 to a host name. Unix-like OSes resolve this address
> > to 'localhost' whereas Windows resolves it to '127.0.0.1'.
> >
> 
> Thank you for the explanation.
> 
> This:
> 
> public class IpToHostName {
> 
>     public static void main(String[] args) {
>         for (int i = 0; i < args.length; i++) {
>             InetAddress addr;
>             try {
>                 String addrStr = args[i];
>                 addr = InetAddress.getByName(addrStr);
>                 String host = addr.getHostName();
>                 System.out.println(String.format("%s -> %s", addrStr,
> host));
>             } catch (UnknownHostException e) {
>                 e.printStackTrace();
>             }
>         }
>     }
> 
> }
> 
> With input
> 
> 127.0.0.1
> 
> produces
> 
> 127.0.0.1 -> 127.0.0.1
> 
> Lovely. So we are stuck with this behavior and the test does not know about
> this quirk and fails. Bleh.
> 
> I only feel good about +'ing a src zip for an RC I can build, so I will not
> vote. If creating RC's were not such a pain...
> 
> If this RC becomes a release, then a note on the site must talk about this
> as an expected build failure on Windows IMO.
> 
> Gary
> 

We had another bug fix and some tutorial updates in the meantime. I'll
cut another RC tomorrow.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message