You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "limc5462 (via GitHub)" <gi...@apache.org> on 2026/03/23 01:44:05 UTC
[PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
limc5462 opened a new pull request, #4337:
URL: https://github.com/apache/streampark/pull/4337
…source pages
<!--
Thank you for contributing to StreamPark! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
## Contribution Checklist
- If this is your first time, please read our contributor guidelines: [Submit Code](https://streampark.apache.org/community/submit_guide/submit_code).
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/streampark/issues).
- Name the pull request in the form "[Feature] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- If the PR is unfinished, add `[WIP]` in your PR title, e.g., `[WIP][Feature] Title of the pull request`.
-->
## What changes were proposed in this pull request
This PR addresses a critical stability issue (flaky tests) in the E2E testing pipeline for StreamPark.
**Fix Flaky UI Tests (`ElementClickInterceptedException`)**:
A race condition frequently occurred in `UserManagementTest` and `UploadManagementTest` where the Selenium webdriver clicked on child menu items while the parent menu's CSS expanding animation was still in progress. This caused clicks to be intercepted by the animated mask or parent container.
<!--(For example: This pull request proposed to add checkstyle plugin).-->
## Brief change log
`SystemPage.java` & `ResourcePage.java`: Added `Thread.sleep()` before all `menu.click()` actions with `@SneakyThrows` to fix `ElementClickInterceptedException` caused by CSS animations.
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
## Verifying this change
This is the last E2E issue I've found. From now on, the pipeline is highly likely to run successfully every time.
<!--*(example:)*
- *Added integration tests for end-to-end.*
- *Added *Test to verify the change.*
- *Manually verified the change by testing locally.* -->
## Does this pull request potentially affect one of the following parts
no
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys merged PR #4337:
URL: https://github.com/apache/streampark/pull/4337
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4337:
URL: https://github.com/apache/streampark/pull/4337#issuecomment-4107488643
## [](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4337) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4337&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4337&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4337)
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4337:
URL: https://github.com/apache/streampark/pull/4337#discussion_r2973648455
##########
streampark-e2e/streampark-e2e-case/src/test/java/org/apache/streampark/e2e/pages/system/SystemPage.java:
##########
@@ -50,37 +51,43 @@ public SystemPage(RemoteWebDriver driver) {
super(driver);
}
+ @SneakyThrows
public <T extends SystemPage.Tab> T goToTab(Class<T> tab) {
if (tab == UserManagementPage.class) {
new WebDriverWait(driver, Constants.DEFAULT_WEBDRIVER_WAIT_DURATION)
.until(ExpectedConditions.elementToBeClickable(menuUserManagement));
+ Thread.sleep(Constants.DEFAULT_UI_ANIMATION_SLEEP_MILLISECONDS);
menuUserManagement.click();
Review Comment:
`@SneakyThrows` around Thread.sleep will propagate InterruptedException as an unchecked exception and also clears the interrupt flag. Please catch InterruptedException explicitly here, call Thread.currentThread().interrupt(), and then fail fast (e.g., rethrow a RuntimeException) so test interruptions/shutdowns behave correctly.
##########
streampark-e2e/streampark-e2e-case/src/test/java/org/apache/streampark/e2e/pages/resource/ResourcePage.java:
##########
@@ -44,24 +45,28 @@ public ResourcePage(RemoteWebDriver driver) {
super(driver);
}
+ @SneakyThrows
public <T extends ResourcePage.Tab> T goToTab(Class<T> tab) {
if (tab == VariablesPage.class) {
new WebDriverWait(driver, Constants.DEFAULT_WEBDRIVER_WAIT_DURATION)
.until(ExpectedConditions.elementToBeClickable(menuVariables));
+ Thread.sleep(Constants.DEFAULT_UI_ANIMATION_SLEEP_MILLISECONDS);
menuVariables.click();
Review Comment:
Using a fixed Thread.sleep before clicking will slow every navigation and can still be flaky on slower/faster environments. Prefer waiting on a deterministic condition (e.g., the Resource menu container has the expected "opened" class / submenu is fully expanded, or retry click until not intercepted) rather than a hard-coded sleep.
##########
streampark-e2e/streampark-e2e-case/src/test/java/org/apache/streampark/e2e/pages/system/SystemPage.java:
##########
@@ -50,37 +51,43 @@ public SystemPage(RemoteWebDriver driver) {
super(driver);
}
+ @SneakyThrows
public <T extends SystemPage.Tab> T goToTab(Class<T> tab) {
if (tab == UserManagementPage.class) {
new WebDriverWait(driver, Constants.DEFAULT_WEBDRIVER_WAIT_DURATION)
.until(ExpectedConditions.elementToBeClickable(menuUserManagement));
+ Thread.sleep(Constants.DEFAULT_UI_ANIMATION_SLEEP_MILLISECONDS);
menuUserManagement.click();
Review Comment:
Using a fixed Thread.sleep before clicking will slow every navigation and can still be flaky on slower/faster environments. Since NavBarPage already detects expanded menus via the `streampark-menu-opened` class, prefer an explicit WebDriverWait for the System menu to be in the opened/expanded state (or retry the click until it succeeds) instead of a hard-coded sleep.
##########
streampark-e2e/streampark-e2e-case/src/test/java/org/apache/streampark/e2e/pages/resource/ResourcePage.java:
##########
@@ -44,24 +45,28 @@ public ResourcePage(RemoteWebDriver driver) {
super(driver);
}
+ @SneakyThrows
public <T extends ResourcePage.Tab> T goToTab(Class<T> tab) {
if (tab == VariablesPage.class) {
new WebDriverWait(driver, Constants.DEFAULT_WEBDRIVER_WAIT_DURATION)
.until(ExpectedConditions.elementToBeClickable(menuVariables));
+ Thread.sleep(Constants.DEFAULT_UI_ANIMATION_SLEEP_MILLISECONDS);
menuVariables.click();
Review Comment:
`@SneakyThrows` around Thread.sleep will propagate InterruptedException as an unchecked exception and also clears the interrupt flag. Please catch InterruptedException explicitly here, call Thread.currentThread().interrupt(), and then fail fast so test interruptions/shutdowns behave correctly.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
Posted by "limc5462 (via GitHub)" <gi...@apache.org>.
limc5462 commented on code in PR #4337:
URL: https://github.com/apache/streampark/pull/4337#discussion_r2986601455
##########
streampark-e2e/streampark-e2e-case/src/test/java/org/apache/streampark/e2e/pages/resource/ResourcePage.java:
##########
@@ -44,24 +45,28 @@ public ResourcePage(RemoteWebDriver driver) {
super(driver);
}
+ @SneakyThrows
public <T extends ResourcePage.Tab> T goToTab(Class<T> tab) {
if (tab == VariablesPage.class) {
new WebDriverWait(driver, Constants.DEFAULT_WEBDRIVER_WAIT_DURATION)
.until(ExpectedConditions.elementToBeClickable(menuVariables));
+ Thread.sleep(Constants.DEFAULT_UI_ANIMATION_SLEEP_MILLISECONDS);
menuVariables.click();
Review Comment:
@wolfboys This sleep pattern (`@SneakyThrows` + `Thread.sleep(DEFAULT_SLEEP_MILLISECONDS)`) is already used in 21 places across the e2e module. My code follows the same convention — sleeping 2000ms after clicking a dropdown to wait for options to render, identical to ApplicationForm.flinkCluster() and UploadsPage. Modifying all existing occurrences would be too invasive; I suggest keeping the current approach consistent.
Like this
<img width="1572" height="1222" alt="image" src="https://github.com/user-attachments/assets/733b74de-f903-491b-887c-7174f68fdef2" />
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [e2e]: Fix flaky ElementClickInterceptedException in System and Resource pages [streampark]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4337:
URL: https://github.com/apache/streampark/pull/4337#issuecomment-4124637607
## [](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4337) **Quality Gate passed**
Issues
 [8 New issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-streampark&pullRequest=4337&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4337&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_incubator-streampark&pullRequest=4337&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_incubator-streampark&pullRequest=4337)
--
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.
To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org