SbloodyS commented on a change in pull request #8214:
URL: https://github.com/apache/dolphinscheduler/pull/8214#discussion_r793272729
##########
File path:
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/FileManageE2ETest.java
##########
@@ -289,7 +290,7 @@ void testUploadUnder1GBFile() throws IOException {
page.uploadFile(testUnder1GBFilePath.toFile().getAbsolutePath());
- await().untilAsserted(() -> {
+ await().pollDelay(Duration.ofSeconds(2)).untilAsserted(() -> {
assertThat(page.fileList())
.as("File list should contain newly-created file")
.extracting(WebElement::getText)
Review comment:
> > I just found in the test that refreshing the page during the upload
process will lead to the cancellation of the upload. So i think both
`pollDealy` and `refresh` should be retained. @kezhenxu94
>
> OK I got the point, but delaying for 2 seconds doesn't guarantee the file
is uploaded completely. When the file is uploaded successfully, the dialog will
disappear automatically, what about adding a wait like `new
WebDriverWait(browser,
10).until(ExpectedConditions.invisibilityOfElementLocated(By.id("<uploadDialog>")));`?
That should make the tests more stable
Sounds like a good idea. I'll give it a try.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]