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

Fernando Guallini fguallini at openjdk.java.net
Thu Mar 4 15:56:58 UTC 2021


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2809/files
  - new: https://git.openjdk.java.net/jdk/pull/2809/files/46b7ed50..b42b9b3d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2809&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2809&range=00-01

  Stats: 12 lines in 2 files changed: 4 ins; 8 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2809.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2809/head:pull/2809

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


More information about the security-dev mailing list