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

ASF GitHub Bot commented on YARN-11404:
---------------------------------------

steveloughran commented on PR #5295:
URL: https://github.com/apache/hadoop/pull/5295#issuecomment-1439816394

   ```
   Caused by: java.lang.ClassNotFoundException: org.junit.jupiter.api.Assertions
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 14 more
   ```
   
   problem here is that maven doesn't import transitive dependencies from a 
-test JAR, so if one module (mapreduce-client) adds a new mandatory dependency 
(here, junit jupiter stuff, maybe junit-mockito) then everything which imports 
the suite and uses it will break. We had that when we added assertJ tests to 
hadoop-common fs contract tests.
   
   Fix here is pom changes everywhere the test jar is referenced.




> Add junit5 dependency to hadoop-mapreduce-client-app to fix few unit test 
> failure
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-11404
>                 URL: https://issues.apache.org/jira/browse/YARN-11404
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: yarn
>            Reporter: Susheel Gupta
>            Assignee: Susheel Gupta
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>         Attachments: 
> patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-app.txt
>
>
> We need to add Junit 5 dependency in
> {code:java}
> /hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/pom.xml{code}
> as the testcase TestAMWebServicesJobConf, TestAMWebServicesJobs, 
> TestAMWebServices, TestAMWebServicesAttempts, TestAMWebServicesTasks were 
> passing locally but failed at jenkins build in this 
> [link|https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5119/7/artifact/out/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-app.txt]
>  for YARN-5607



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to