RFR: 8262862: Harden tests sun/security/x509/URICertStore/ExtensionsWithLDAP.java and krb5/canonicalize/Test.java [v2]

Aleksei Efimov aefimov at openjdk.java.net
Fri Mar 5 16:03:07 UTC 2021


On Thu, 4 Mar 2021 15:56:58 GMT, Fernando Guallini <fguallini at openjdk.org> wrote:

>> Certain JVM tools may access and initialise InetAddress class and its static fields during start up resulting in a NameService implementation being already set to the default **PlatformNameService**, causing intermittent failures in some tests that expect the use of **HostsFileNameService** instead by setting the system property jdk.net.hosts.file in the test main body, which has no effect in this scenario
>> 
>> By setting the property **jdk.net.hosts.file** in the @run tag, there is certainty that it will be properly configured at the time that a [NameService](https://github.com/openjdk/jdk/blob/382e38dd246596ec94a1f1ce0e0f9e87f53366c7/src/java.base/share/classes/java/net/InetAddress.java#L1155) is created
>
> Fernando Guallini has updated the pull request incrementally with one additional commit since the last revision:
> 
>   move set env properties to header

The latest version looks good to me. Thanks.

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

Marked as reviewed by aefimov (Committer).

PR: https://git.openjdk.java.net/jdk/pull/2809


More information about the security-dev mailing list