Skip to content

YARN-11969. Make catalog-webapp jasmine browser tests skippable indep… - #8621

Open
ferdelyi wants to merge 2 commits into
apache:trunkfrom
ferdelyi:YARN-11969
Open

YARN-11969. Make catalog-webapp jasmine browser tests skippable indep…#8621
ferdelyi wants to merge 2 commits into
apache:trunkfrom
ferdelyi:YARN-11969

Conversation

@ferdelyi

@ferdelyi ferdelyi commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

…endently of -DskipTests

Description of PR

hadoop-yarn-applications-catalog-webapp 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 module's jasmine config previously hardcoded its skip flag to ${skipTests},
so the only way to avoid the browser test was -DskipTests, which skips every test
in the module.

This PR introduces a skipJasmineTests property (default ${skipTests}) and binds
the plugin's <skipJasmineTests> 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.

How was this patch tested?

Single-file change to the catalog-webapp pom.xml. Verified property resolution
with mvn help:evaluate:

  • No flag: resolves to ${skipTests} — same value the plugin received before.
  • -DskipTests: resolves to true (jasmine skipped, as before).
  • -DskipJasmineTests=true: resolves to true (jasmine skipped independently).

For code changes:

  • [ x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

If an AI tool was used:

…endently 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 <skipJasmineTests> 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) <noreply@anthropic.com>
@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 55s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 1s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 49m 26s trunk passed
+1 💚 compile 1m 12s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 1m 5s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 mvnsite 1m 9s trunk passed
+1 💚 javadoc 0m 52s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 44s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 shadedclient 90m 56s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 42s the patch passed
+1 💚 compile 0m 36s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 36s the patch passed
+1 💚 compile 0m 37s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 37s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 0m 39s the patch passed
+1 💚 javadoc 0m 24s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 20s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 shadedclient 38m 4s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 1m 12s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-applications_hadoop-yarn-applications-catalog_hadoop-yarn-applications-catalog-webapp.txt hadoop-yarn-applications-catalog-webapp in the patch failed.
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
135m 53s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8621/1/artifact/out/Dockerfile
GITHUB PR #8621
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux a2707d649818 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5dcb71d
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8621/1/testReport/
Max. process+thread count 578 (vs. ulimit of 10000)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8621/1/console
versions git=2.43.0 maven=3.9.15
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@ferdelyi
ferdelyi marked this pull request as ready for review July 23, 2026 12:46

@slfan1989 slfan1989 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Java unit tests pass;

the reported failure occurs while starting the legacy PhantomJS binary on Ubuntu 24.04/OpenSSL3.

The Yetus command does not include -DskipJasmineTests=true, so this failure does not exercise the newly added option.

The property wiring looks correct and preserves the existing -DskipTests behavior. It would be helpful to include an end-to-end verification with:

mvn clean test -DskipJasmineTests=true

This is non-blocking from my side. +1.

…eTests 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 <skipJasmineTests> element in the plugin
<configuration> 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 <skipJasmineTests> 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) <noreply@anthropic.com>
@ferdelyi

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @slfan1989 — and especially for flagging that the Yetus run never exercised -DskipJasmineTests=true. I ran that end-to-end check locally as you suggested, and it turned out the flag didn't actually skip the jasmine specs, hence removed the explicit element (and the added property) entirely and rely on the plugin's own bindings. The independent skip works, -DskipTests still skips jasmine, default still runs.

@ferdelyi
ferdelyi requested a review from slfan1989 July 28, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants