Skip to content

Commit 327869e

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

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
@@ -427,14 +427,16 @@ public static void openLibertyToolWindow(RemoteRobot remoteRobot) {
427427
Exception error = null;
428428
for (int i = 0; i < maxRetries; i++) {
429429
try {
430-
TestUtils.sleepAndIgnoreException(10);
430+
TestUtils.sleepAndIgnoreException(10); // wait for UI to be rendered before searching for a button
431431
error = null;
432432
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
433433
projectFrame.getBaseLabel("Liberty", "5");
434434
break;
435435
} catch (WaitForConditionTimeoutException wfcte) {
436436
// The Liberty tool window is closed. Open it.
437437
clickOnWindowPaneStripeButton(remoteRobot, "Liberty");
438+
// After clicking it can take seconds for the window to open on a slow cloud machine.
439+
// Important since this is in a loop and you may click twice if there is no sleep.
438440
TestUtils.sleepAndIgnoreException(5);
439441
break;
440442
} catch (Exception e) {

0 commit comments

Comments
 (0)