This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 079adc9 [ci] Fix flaky test in e2e user (#7847)
079adc9 is described below
commit 079adc9eca5271462f664cb517491ecd24d17953
Author: Jiajie Zhong <[email protected]>
AuthorDate: Thu Jan 6 17:29:06 2022 +0800
[ci] Fix flaky test in e2e user (#7847)
* [ci] Fix flaky test in e2e user
fix: #7656
* Change class name
* Change get delete bottom function
* Correct function
---
.../org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
index eba9cce..17f1ac8 100644
---
a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
+++
b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/security/TenantPage.java
@@ -71,8 +71,11 @@ public final class TenantPage extends NavBarPage implements
SecurityPage.Tab {
tenantList()
.stream()
.filter(it -> it.getText().contains(tenant))
+ .flatMap(it -> it.findElements(By.className("delete")).stream())
+ .filter(WebElement::isDisplayed)
.findFirst()
- .ifPresent(it -> it.findElement(By.className("delete")).click());
+ .orElseThrow(() -> new RuntimeException("No delete button in user
list"))
+ .click();
buttonConfirm().click();