harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko" <dkishe...@gmail.com>
Subject Re: [classlib][test] Configuration dependent test of InetAddress.getHostName
Date Tue, 24 Oct 2006 11:30:47 GMT
2006/10/24, Fedotov, Alexei A <alexei.a.fedotov@intel.com>:
> I wonder about the first option. Is there any way to check that symbolic
> name corresponds to the local computer? I can imagine the following
> condition to check this.
> InetAddress.getByName(InetAddress.getByName("").getHostName()).
> isLoopbackAddress()
This test failed because isLoopbackAddress() expected 127.X.X.X

2006/10/24, Fedotov, Alexei A <alexei.a.fedotov@intel.com>:
> Andrew,
> I agree that test should be fixed. I suggested using one of the
> following checks to validate that the host is localhost.
> InetAddress.getByName(host).isLoopbackAddress()
> InetAddress.getByName(host).isSiteLocalAddress()
It's possible but it will be another test

+1 exclude this test (not whole test but localhost check)

View raw message