[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924279#comment-17924279
 ] 

ASF GitHub Bot commented on MAPREDUCE-7418:
-------------------------------------------

slfan1989 commented on code in PR #7350:
URL: https://github.com/apache/hadoop/pull/7350#discussion_r1943692108


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java:
##########
@@ -369,9 +369,15 @@ public void setup() {
 
         if (httpScheme.equals(WebAppUtils.HTTPS_PREFIX)) {
           String amKeystoreLoc = System.getenv("KEYSTORE_FILE_LOCATION");
+          if (StringUtils.isBlank(amKeystoreLoc)) {

Review Comment:
   Thank you for your question! 
   
   We made this adjustment because the unit tests 
`TestAMWebApp#testMRWebAppSSLEnabled` and 
`TestAMWebApp#testMRWebAppSSLEnabledWithClientAuth` are failing in JUnit 5.
   
   In the original JUnit 4 environment, these tests relied on the 
`EnvironmentVariables.set` method to modify `System.Env` data. However, in 
JUnit 5, we can no longer modify the environment variables directly. One 
important reason for this is that starting from JDK 9, `System.Env` became an 
immutable structure. It is recommended to use `System.setProperty` and 
`System.getProperty` as replacements.
   
   Therefore, we modified the unit tests to temporarily set 
`System.setProperty`, and also check if the variables we set exist in 
`System.getProperty` when used.





> Upgrade Junit 4 to 5 in hadoop-mapreduce-client-app
> ---------------------------------------------------
>
>                 Key: MAPREDUCE-7418
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7418
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 3.3.4
>            Reporter: Ashutosh Gupta
>            Assignee: Ashutosh Gupta
>            Priority: Major
>              Labels: pull-request-available
>
> Upgrade Junit 4 to 5 in hadoop-mapreduce-client-app



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org

Reply via email to