devmadhuu opened a new pull request, #6073:
URL: https://github.com/apache/ozone/pull/6073

   ## What changes were proposed in this pull request?
   This PR change is to fix the below java reflection error in 
`TestECContainerRecovery.testECContainerRecoveryWithTimedOutRecovery` test case:
   
   ```
   NoSuchFieldException: modifiers
        at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
        at 
org.apache.ozone.test.GenericTestUtils.getFieldReflection(GenericTestUtils.java:236)
        at 
org.apache.hadoop.ozone.container.TestECContainerRecovery.testECContainerRecoveryWithTimedOutRecovery(TestECContainerRecovery.java:304)
   ```
   Java 9 onwards, packages are divided among modules and module based access 
is restricted by default. So application needs to provide and open explicit 
access to respective modules containing respective packages and needs to 
provide additional JVM arguments for that. This PR passes the explicit JVM args 
to open module access if the Java version is greater than 9.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-10121
   
   ## How was this patch tested?
   
   This patch was tested using existing Junit test run for both Java 8 and Java 
17 environments. Below are test results:
   
   `Java 17 run:`
   <img width="599" alt="image" 
src="https://github.com/apache/ozone/assets/20607992/3d3813a6-1c07-4a42-9ea3-a41d86bb392f";>
   <img width="787" alt="image" 
src="https://github.com/apache/ozone/assets/20607992/b789c59c-5680-43a6-98c6-b4a3696c4704";>
   <img width="583" alt="image" 
src="https://github.com/apache/ozone/assets/20607992/5fc97a11-a278-4264-9721-0c1dbb20d300";>
   
   `Java 8 run with same changes:`
   <img width="619" alt="image" 
src="https://github.com/apache/ozone/assets/20607992/483dbb5e-6c47-4065-8e50-6fa33fb400a6";>
   
   
   


-- 
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]

Reply via email to