RFR: 7903746: jtreg tests run extremely slow on some environments due to hostname lookups [v3]

Jaikiran Pai jpai at openjdk.org
Tue Jul 9 10:32:47 UTC 2024


On Tue, 9 Jul 2024 10:00:03 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Mark's suggestion - "Cached" instead of "Lazy"
>
> src/share/classes/com/sun/javatest/regtest/config/RegressionEnvironment.java line 69:
> 
>> 67:                 hostname = InetAddress.getLocalHost().getCanonicalHostName();
>> 68:             } catch (UnknownHostException e) {
>> 69:                 hostname = "127.0.0.1";
> 
> I'm not sure "127.0.0.1" is a canonical hostname ;-)

`InetAddress.getCanonicalHostName()`'s API allows it to return a textual representation of IP address if it isn't able to determine the fully qualified domain name. So I think naming this class `CachedCanonicalHostName` and yet continuing to return an IP address as a fallback, like the previous code was doing, is OK.

-------------

PR Review Comment: https://git.openjdk.org/jtreg/pull/204#discussion_r1670232118


More information about the jtreg-dev mailing list