Skip to content

Commit 7f967d1

Browse files
committed
Add comments to explain why delays are needed for Project View
Signed-off-by: Paul Gooderham <[email protected]>
1 parent 327869e commit 7f967d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,16 @@ public static void openProjectView(RemoteRobot remoteRobot) {
480480
Exception error = null;
481481
for (int i = 0; i < maxRetries; i++) {
482482
try {
483-
TestUtils.sleepAndIgnoreException(10);
483+
TestUtils.sleepAndIgnoreException(10); // wait for UI to be rendered before searching for a button
484484
error = null;
485485
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
486486
projectFrame.getContentComboLabel("Project", "5");
487487
break;
488488
} catch (WaitForConditionTimeoutException wfcte) {
489489
// The project view is closed. Open it.
490490
clickOnWindowPaneStripeButton(remoteRobot, "Project");
491+
// After clicking it can take seconds for the window to open on a slow cloud machine.
492+
// Important since this is in a loop and you may click twice if there is no sleep.
491493
TestUtils.sleepAndIgnoreException(5);
492494
break;
493495
} catch (Exception e) {

0 commit comments

Comments
 (0)