LuciferYang opened a new pull request #29824:
URL: https://github.com/apache/spark/pull/29824


   ### What changes were proposed in this pull request?
   
   When I tried to verify that the `resource-managers/yarn` module passed all 
UTs in Scala 2.13 , I found that there is a 
   issue related to classpath order maybe blocked the UTs because there are 
more than one `servlet-api` dependency in spark now:
   
   - One is `javax.servlet:javax.servlet-api:3.10:compile` config in 
core/pom.xml,
   
   - The other is `jakarta.servlet:jakarta.servlet-api:4.0.3:test`  cascaded by 
`org.glassfish.jersey.test-framework.providers`
   
   we can use `mvn dependency:tree` to check it .
   
   So when we execute `resource-managers/yarn` module test use
   
   ```
   mvn clean test -pl resource-managers/yarn -Pyarn 
   ```
   or 
   ```
   mvn clean test -pl resource-managers/yarn -Pyarn -Pscala-2.13
   ```
   
   and if the position of `javax.servlet-api` in the  in classpath is before 
`jakarta.servlet-api`, there are some cases failed in `YarnClusterSuite`, 
`YarnShuffleIntegrationSuite`  and `YarnShuffleAuthSuite`.
   
   The failed reason as follow:
   
   ```
   20/09/18 19:14:07.486 launcher-proc-1 INFO YarnClusterDriver: Exception in 
thread "main" java.lang.ExceptionInInitializerError
   ...
   20/09/18 19:14:07.486 launcher-proc-1 INFO YarnClusterDriver: Caused by: 
java.lang.SecurityException: class "javax.servlet.http.HttpSessionIdListener"'s 
signer information does not match signer information of other classes in the 
same package
   ...
   ```
   
   ### Why are the changes needed?
   
   Avoid UTs error caused by classpath order .
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   
   - Scala 2.12: Pass the Jenkins or GitHub Action
   
   - Scala 2.13: Pass 2.13 Build GitHub Action and do the following:
   
   ```
   dev/change-scala-version.sh 2.13
   mvn clean install -DskipTests -pl resource-managers/yarn -Pyarn -Pscala-2.13 
-am
   mvn clean test -pl resource-managers/yarn -Pyarn -Pscala-2.13
   ```
   
   ```
   Tests: succeeded 136, failed 0, canceled 1, ignored 0, pending 0
   All tests passed.
   ```


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

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