-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b02
TestNG tests that are in the same package as the API they are testing need to run with -XaddReads:$MODULE=ALL-UNNAMED, otherwise they will get an IllegalAccessError. Here's an example with jdk/test/java/util/regex/PatternStreamTest.java:
Execution faile[...]sError: superclass access check failed: class java.util.stream.LoggingTestCase (in module java.base) cannot access class org.testng.Assert (in unnamed module @0x78134723) because module java.base does not read unnamed module @0x78134723
The reason that we aren't seeing this in our test runs is because the java.base module is currently "loose", meaning it reads all unnamed modules (seeJDK-8146369). We will fix the java.base module issue once this jtreg issue is fixed. We don't have tests in other areas that run into it.
Execution faile[...]sError: superclass access check failed: class java.util.stream.LoggingTestCase (in module java.base) cannot access class org.testng.Assert (in unnamed module @0x78134723) because module java.base does not read unnamed module @0x78134723
The reason that we aren't seeing this in our test runs is because the java.base module is currently "loose", meaning it reads all unnamed modules (see
- blocks
-
JDK-8146369 Re-examine whether named modules can be loose.
-
- Resolved
-