Yunyung opened a new pull request, #3996: URL: https://github.com/apache/ambari/pull/3996
## What changes were proposed in this pull request? Fix the error `module java.base does not "opens sun.nio.fs" to unnamed module` in surefire java tests. ## How was this patch tested? Tested via: `mvn -am test -pl ambari-server -DskipPythonTests -Dmaven.test.failure.ignore -Dmaven.artifact.threads=10 -Drat.skip -DskipAdminWebTests=true -Dtest=AlertScriptDispatcherTest -Dsurefire.failIfNoSpecifiedTests=false` #### Before: ``` [INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ambari-server --- [INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest [ERROR] Tests run: 18, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 1.430 s <<< FAILURE! -- in org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest [ERROR] org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest.testNonExistentScriptPath -- Time elapsed: 0.028 s <<< ERROR! java.lang.reflect.InaccessibleObjectException: Unable to make public sun.nio.fs.UnixPath sun.nio.fs.UnixPath.getName(int) accessible: module java.base does not "opens sun.nio.fs" to unnamed module @528931cf --------------- snip ------------------ [ERROR] Errors: [ERROR] AlertScriptDispatcherTest.testArgumentEscaping:493 » InaccessibleObject Unable to make public sun.nio.fs.UnixPath sun.nio.fs.UnixPath.getName(int) accessible: module java.base does not "opens sun.nio.fs" to unnamed module @528931cf [ERROR] AlertScriptDispatcherTest.testNonExecutableScriptPath:137 » InaccessibleObject Unable to make public sun.nio.fs.UnixPath sun.nio.fs.UnixPath.getName(int) accessible: module java.base does not "opens sun.nio.fs" to unnamed module @528931cf [ERROR] AlertScriptDispatcherTest.testNonExistentScriptPath:124 » InaccessibleObject Unable to make public sun.nio.fs.UnixPath sun.nio.fs.UnixPath.getName(int) accessible: module java.base does not "opens sun.nio.fs" to unnamed module @528931cf [ERROR] AlertScriptDispatcherTest.testValidScriptPath:184 » InaccessibleObject Unable to make public sun.nio.fs.UnixPath sun.nio.fs.UnixPath.getName(int) accessible: module java.base does not "opens sun.nio.fs" to unnamed module @528931cf [INFO] [ERROR] Tests run: 18, Failures: 0, Errors: 4, Skipped: 0 [INFO] [ERROR] ``` #### After: ``` [INFO] --- maven-surefire-plugin:3.2.5:test (default-test) @ ambari-server --- [INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest [INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.280 s -- in org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0 ``` Jira: [AMBARI-26460](https://issues.apache.org/jira/browse/AMBARI-26460) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
