[ https://issues.apache.org/jira/browse/GEODE-10129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510117#comment-17510117 ]
ASF subversion and git services commented on GEODE-10129: --------------------------------------------------------- Commit 8bf5a814ed03d347301e9e3c5cebbcdddbc6a068 in geode's branch refs/heads/develop from Dale Emery [ https://gitbox.apache.org/repos/asf?p=geode.git;h=8bf5a81 ] GEODE-10129: Forward opens/exports to child JVMs (#7457) * GEODE-10129: Forward opens/exports to child JVMs Several tests and test framework classes launch child JVMs to run Geode product and test code. Those tests and classes now forward the test JVM's `--add-opens` and `--add-exports` options to the child JVMs. * export sun.reflect.generics.repository * Restore inadvertently removed ProcessManager args > Forward module-related options when launching test subprocesses > --------------------------------------------------------------- > > Key: GEODE-10129 > URL: https://issues.apache.org/jira/browse/GEODE-10129 > Project: Geode > Issue Type: Improvement > Components: tests > Affects Versions: 1.15.0 > Reporter: Dale Emery > Assignee: Dale Emery > Priority: Major > Labels: Java17, pull-request-available > > Several tests and test helpers launch JVMs to run Geode code. For tests to > run properly on JDK 17, that code must open or export the packages needed by > the code that will run in the JVMs. > Such helpers include: > - {{GfshCommandRule}} > - {{ProcessManager}} for DUnit tests. > - {{ServerContainer}} for Jetty/Tomcat session tests. > Also, {{ServerLauncherDUnitTest}} launches JVMs via a {{{}ProcessBuilder{}}}. > A simple way to support opening and exporting the required packages is: > # Assume that the current JVM opened and exported all required packages. > (See https://issues.apache.org/jira/browse/GEODE-10128) > # Query the {{--add-opens}} and {{--add-exports}} that were used to launch > the current JVM. This can be done by calling > {{{}ManagementFactory.getRuntimeMXBean().getInputArguments(){}}}, then > filtering the list to retain only the {{--add-opens}} and {{--add-exports}} > options. > # Add those options when launching a subprocess. > It would be useful to query and perform the current JVM a single place. I > propose a static method: {{{}JavaModuleHelper.getJvmModuleOptions(){}}}. -- This message was sent by Atlassian Jira (v8.20.1#820001)