Browse Source

[E2E] Fix flaky udf manage e2e test (#8232)

* fix_file_manage_e2e_error

* fix error

* fix error

* fix error
3.0.0/version-upgrade
xiangzihao 3 years ago committed by GitHub
parent
commit
6094927dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UdfManageE2ETest.java

8
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/UdfManageE2ETest.java

@ -37,8 +37,11 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.io.File;
import java.io.FileOutputStream;
@ -109,7 +112,8 @@ public class UdfManageE2ETest {
void testCreateDirectory() {
final UdfManagePage page = new UdfManagePage(browser);
browser.navigate().refresh();
new WebDriverWait(page.driver(), 10)
.until(ExpectedConditions.urlContains("/#/resource/udf"));
page.createDirectory(testDirectoryName, "test_desc");
@ -164,6 +168,8 @@ public class UdfManageE2ETest {
page.uploadFile(testUploadUdfFilePath.toFile().getAbsolutePath());
new WebDriverWait(browser, 10).until(ExpectedConditions.invisibilityOfElementLocated(By.id("fileUpdateDialog")));
await().untilAsserted(() -> {
assertThat(page.udfList())
.as("File list should contain newly-created file")

Loading…
Cancel
Save