On Fri, 24 Feb 2023 19:35:29 GMT, Madjosz <d...@openjdk.org> wrote: >> test/jdk/java/time/test/java/time/zone/TestZoneRulesProvider.java line 123: >> >>> 121: ZoneRulesProvider.registerProvider(provider); >>> 122: assertTrue(ZoneId.getAvailableZoneIds().contains(zone), >>> "Unexpected non-availability for " + zone); >>> 123: assertNotNull(ZoneId.of(zone), "ZoneId instance for " + zone + >>> " should be obtainable"); >> >> If the `zone` does not exist, it will not return `null` but throw an >> exception. Assertion needs to be modified correctly. > > Which version of TestNG is used for JDK? In JUnit 5 I would just use > `assertDoesNotThrow()` in such a case but TestNG seems to lack such method.
I just removed the non-`null` assertion as the fact that the call succeeds already is the thing we want to test here. ------------- PR: https://git.openjdk.org/jdk/pull/12690