Skip to content

[ZEPPELIN-6409] Fix Selenium integration test flakiness after ZEPPELIN-6400#5209

Open
jongyoul wants to merge 4 commits intoapache:masterfrom
jongyoul:ZEPPELIN-6409-fix-selenium-tests
Open

[ZEPPELIN-6409] Fix Selenium integration test flakiness after ZEPPELIN-6400#5209
jongyoul wants to merge 4 commits intoapache:masterfrom
jongyoul:ZEPPELIN-6409-fix-selenium-tests

Conversation

@jongyoul
Copy link
Copy Markdown
Member

@jongyoul jongyoul commented Apr 6, 2026

Summary

  • authenticationUser(): Replace sleep(1000) with explicit wait for the navbar user dropdown to appear (proves login succeeded and AngularJS digest is done), then force-dismiss any lingering Bootstrap modal backdrop via jQuery
  • logoutUser(): Use clickableWait() instead of raw findElement() for robust element interaction; wrap modal close button in try-catch
  • testAngularRunParagraph(): Fix race condition where waitForParagraph("FINISHED") matched the previous run's state. Use stalenessOf to detect paragraph output refresh, then visibilityWait for the new element, and JavaScript click to bypass ng-click overlay issues

Context

After ZEPPELIN-6400 moved ZeppelinConfiguration from zeppelin-interpreter to zeppelin-zengine, RemoteInterpreterServer.init() changed from loading config via ZeppelinConfiguration.load() + overlay to pure Properties-based initialization. This subtle timing change in interpreter startup exposed pre-existing Selenium test flakiness in the test-selenium-with-spark-module-for-spark-3-5 CI job.

The CI failures were:

  • InterpreterModeActionsIT.testPerUserIsolatedActionElementClickInterceptedException because login modal was still visible when clicking the navigation dropdown
  • ZeppelinIT.testAngularRunParagraphTimeoutException due to race condition: after re-running an Angular paragraph, the old output element was matched before the new one rendered

Test plan

  • CI: frontend.ymltest-selenium-with-spark-module-for-spark-3-5 job passes
  • CI: frontend.yml — All other E2E jobs remain green (Playwright auth failure is unrelated Firefox keyboard shortcut flakiness)

@jongyoul jongyoul force-pushed the ZEPPELIN-6409-fix-selenium-tests branch from 2c3ecd4 to 9e4ecca Compare April 6, 2026 02:22
…N-6400

After ZEPPELIN-6400 moved ZeppelinConfiguration from zeppelin-interpreter
to zeppelin-zengine, the subtle timing changes in interpreter initialization
exposed pre-existing Selenium test flakiness.

- authenticationUser(): Replace sleep(1000) with explicit wait for login
  modal to disappear via invisibilityOfElementLocated, preventing
  ElementClickInterceptedException when the next action fires too early
- logoutUser(): Use clickableWait() instead of raw findElement() for
  robust element interaction; wrap modal close button in try-catch
- testAngularRunParagraph(): Add waitForText() after re-running Angular
  paragraph to ensure output is re-rendered before attempting click

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jongyoul jongyoul force-pushed the ZEPPELIN-6409-fix-selenium-tests branch from 9e4ecca to bb7e497 Compare April 6, 2026 09:59
jongyoul and others added 2 commits April 6, 2026 19:13
…ement

clickAndWait() times out because Selenium considers the Angular-compiled
ng-click div as not clickable (overlay/stale element during Angular digest).
Switch to visibilityWait + executeScript("arguments[0].click()") which
bypasses Selenium's clickability check and directly triggers the DOM click.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jongyoul jongyoul force-pushed the ZEPPELIN-6409-fix-selenium-tests branch from 102ec39 to fc68315 Compare April 6, 2026 15:06
…ssOf

The Angular paragraph re-run replaces the output DOM element. Without
waiting for the old element to become stale, the test may see the old
FINISHED state and try to find the new output before it exists.

Fix: capture the old output element before re-run, wait for stalenessOf
to confirm DOM refresh, then wait for the new element to appear.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jongyoul jongyoul marked this pull request as ready for review April 7, 2026 03:22
Copilot AI review requested due to automatic review settings April 7, 2026 03:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves stability of Zeppelin’s Selenium-based integration tests by replacing timing-sensitive interactions with more robust waits and interaction strategies, addressing flakiness observed after interpreter startup timing changes.

Changes:

  • Update testAngularRunParagraph() to detect paragraph output refresh via staleness checks and re-locate the Angular output element before interacting.
  • Harden login/logout flows by switching some interactions to clickableWait() and adding post-login UI synchronization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java Adds additional synchronization around Angular paragraph re-run and changes the click strategy for the Angular output element.
zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java Adjusts authentication/logout helpers to use explicit waits and attempts to mitigate modal/overlay interference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants