This is an automated email from the ASF dual-hosted git repository.
slfan1989 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new b6063575582 YARN-11931. Fix router webapp tests by adding EclipseLink
test dependency. (#8261) Contributed by Shilun Fan.
b6063575582 is described below
commit b6063575582e0ff8892e051d74b4d34eeb243ade
Author: slfan1989 <[email protected]>
AuthorDate: Sun Feb 22 11:53:59 2026 +0800
YARN-11931. Fix router webapp tests by adding EclipseLink test dependency.
(#8261) Contributed by Shilun Fan.
* YARN-11931. Fix router webapp tests by adding EclipseLink test dependency.
After upgrading to Jersey 2.46, TestRouterWebServicesREST and
TestFederationWebApp fail with NoClassDefFoundError for
org.eclipse.persistence.internal.queries.ContainerPolicy.
This patch adds org.eclipse.persistence:org.eclipse.persistence.core
as a test dependency in hadoop-yarn-server-router/pom.xml.
Additionally, fixed a classpath concatenation bug in JavaProcess.java
where File.pathSeparator was missing when appending test resources path.
Test Results:
- TestRouterWebServicesREST: 42 tests passed
- TestFederationWebApp: 52 tests passed
Reviewed-by: Chris Nauroth <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
---
.../hadoop-yarn-server/hadoop-yarn-server-router/pom.xml | 6 ++++++
.../org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/pom.xml
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/pom.xml
index eeb3e6f0753..5887c893df2 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/pom.xml
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/pom.xml
@@ -126,6 +126,12 @@
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>org.eclipse.persistence.core</artifactId>
+ <version>${eclipse-persistence.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>com.google.inject</groupId>
diff --git
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java
index 3760b96c241..db5dc80fbc3 100644
---
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java
+++
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/JavaProcess.java
@@ -40,7 +40,7 @@ public JavaProcess(Class<?> clazz, List<String>
addClassPaths, File output)
String javaBin =
javaHome + File.separator + "bin" + File.separator + "java";
String classpath = System.getProperty("java.class.path");
- classpath = classpath.concat("./src/test/resources");
+ classpath = classpath + File.pathSeparator + "./src/test/resources";
if (addClassPaths != null) {
for (String addClasspath : addClassPaths) {
classpath = classpath.concat(File.pathSeparatorChar + addClasspath);
@@ -60,7 +60,7 @@ public JavaProcess(Class<?> clazz, List<String>
addClassPaths, File output, Stri
String javaHome = System.getProperty("java.home");
String javaBin = javaHome + File.separator + "bin" + File.separator +
"java";
String classpath = System.getProperty("java.class.path");
- classpath = classpath.concat("./src/test/resources");
+ classpath = classpath + File.pathSeparator + "./src/test/resources";
if (addClassPaths != null) {
for (String addClasspath : addClassPaths) {
classpath = classpath.concat(File.pathSeparatorChar + addClasspath);
@@ -83,4 +83,4 @@ public void stop() throws InterruptedException {
}
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]