From 5dcb71d8fb15a93ea39128a1044838d893d4cc4a Mon Sep 17 00:00:00 2001 From: Ferenc Erdelyi Date: Tue, 21 Jul 2026 11:41:23 +0200 Subject: [PATCH 1/3] YARN-11969. Make catalog-webapp jasmine browser tests skippable independently of -DskipTests The hadoop-yarn-applications-catalog-webapp module runs a jasmine-maven-plugin test that drives a PhantomJS browser. In headless build environments PhantomJS cannot start and the plugin fails with UnreachableBrowserException. Because this is a plugin-execution failure rather than a Surefire test failure, -Dmaven.test.failure.ignore=true does not suppress it and it fails the build. The jasmine config previously hardcoded its skip flag to ${skipTests}, so the only escape hatch was -DskipTests, which skips every test in the module. Introduce a skipJasmineTests property defaulting to ${skipTests} and bind the plugin's to it. Default behavior is unchanged; a headless build can pass -DskipJasmineTests=true to skip only the browser-driven tests while still compiling and covering the rest of the module. Build-config change only; no production code affected. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../hadoop-yarn-applications-catalog-webapp/pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml index 9c93c9553def72..4844ffa27abdcb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml @@ -37,6 +37,12 @@ UTF-8 false *Spec + + ${skipTests} @@ -484,7 +490,7 @@ - ${skipTests} + ${skipJasmineTests} org.openqa.selenium.phantomjs.PhantomJSDriver From f5de82a13fab51085422b01eed6c0c91a834cad3 Mon Sep 17 00:00:00 2001 From: Ferenc Erdelyi Date: Tue, 28 Jul 2026 18:00:32 +0200 Subject: [PATCH 2/3] YARN-11969. Remove hardcoded skipJasmineTests element so -DskipJasmineTests takes effect Follow-up to the previous commit. Verifying that change with a real build (mvn test -DskipJasmineTests=true) showed the jasmine specs still ran, i.e. the new flag had no effect. Root cause: the jasmine-maven-plugin (2.1) already declares skipJasmineTests as @Parameter(property="skipJasmineTests") and skips when skipTests, maven.test.skip or skipJasmineTests is true (isSkipTests() ORs the three). Providing an explicit element in the plugin overrides that native property binding, and the same-named project property added in the previous commit shadowed the -DskipJasmineTests user property during interpolation, so the plugin never saw the flag. (mvn help:evaluate resolved the property to true, which was a misleading positive: it uses different precedence than plugin-config interpolation.) Fix: drop the explicit element and the added property entirely, and let the plugin's own bindings apply. -DskipTests continues to skip jasmine via isSkipTests(), while -DskipJasmineTests=true now skips only the browser-driven specs and leaves the module's other tests running. Verified with mvn test on the module: - -DskipJasmineTests=true -> "Skipping Jasmine Specs", build succeeds, surefire runs - -DskipTests -> "Skipping Jasmine Specs", build succeeds - (no flag) -> "Executing Jasmine Specs", build succeeds Co-Authored-By: Claude Opus 4.8 (1M context) --- .../pom.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml index 4844ffa27abdcb..9660b6a61471f8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml @@ -37,12 +37,6 @@ UTF-8 false *Spec - - ${skipTests} @@ -490,7 +484,14 @@ - ${skipJasmineTests} + org.openqa.selenium.phantomjs.PhantomJSDriver From ca9ebbfd604543957fcfa069a55d1e2ca306b339 Mon Sep 17 00:00:00 2001 From: Ferenc Erdelyi Date: Wed, 29 Jul 2026 19:21:28 +0200 Subject: [PATCH 3/3] YARN-11969. Address review: concise pom comment and document -DskipJasmineTests Per review feedback from Cheng Pan (pan3793): - Shorten the verbose skipJasmineTests comment in the catalog-webapp pom to a single note that jasmine is skipped when any of -Dmaven.test.skip=true, -DskipTests or -DskipJasmineTests=true is set, and that no explicit skipJasmineTests element should be declared (it would override those flags). - Document -DskipJasmineTests=true in BUILDING.txt's "Tests options" section. Co-Authored-By: Claude Opus 4.8 (1M context) --- BUILDING.txt | 3 +++ .../hadoop-yarn-applications-catalog-webapp/pom.xml | 11 +++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index c12d8da44fad7e..357678d10345c2 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -220,6 +220,9 @@ Maven build goals: * Use -DskipTests to skip tests when running the following Maven goals: 'package', 'install', 'deploy' or 'verify' + * Use -DskipJasmineTests=true to skip only the browser-driven jasmine tests in + hadoop-yarn-applications-catalog-webapp (e.g. on a headless machine with no + browser) while still running the module's other tests. * -Dtest=,,.... * -Dtest.exclude= * -Dtest.exclude.pattern=**/.java,**/.java diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml index 9660b6a61471f8..4fec0bdbff3c61 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/pom.xml @@ -484,14 +484,9 @@ - + org.openqa.selenium.phantomjs.PhantomJSDriver