diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 321d700bd..5a2dfe335 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -50,16 +50,14 @@ jobs: strategy: fail-fast: false matrix: - runtime: [ linux, mac, windows ] + os: [ubuntu-latest, macOS-latest, windows-latest] + iteration: [1, 2, 3, 4] include: - - runtime: linux - os: ubuntu-latest + - os: ubuntu-latest reportName: linux-test-report - - runtime: mac - os: macOS-latest + - os: macOS-latest reportName: mac-test-report - - runtime: windows - os: windows-latest + - os: windows-latest reportName: windows-test-report env: USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }} @@ -108,7 +106,7 @@ jobs: if: ${{ runner.os == 'Linux' && !failure() }} uses: actions/upload-artifact@v4.3.4 with: - name: liberty-tools-intellij-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} + name: liberty-tools-intellij-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }}-${{ matrix.iteration }} path: | ./**/*liberty-tools-intellij*.zip ./**/libs/*liberty-tools-intellij*.jar @@ -122,6 +120,6 @@ jobs: if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} uses: actions/upload-artifact@v4.3.4 with: - name: ${{ matrix.reportName }}-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }} + name: ${{ matrix.reportName }}-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH }}-${{ matrix.iteration }} path: | - liberty-tools-intellij/build/reports/ + liberty-tools-intellij/build/reports/ \ No newline at end of file diff --git a/src/test/java/io/openliberty/tools/intellij/it/SingleModMPProjectTestCommon.java b/src/test/java/io/openliberty/tools/intellij/it/SingleModMPProjectTestCommon.java index c794fea80..447f1ec85 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/SingleModMPProjectTestCommon.java +++ b/src/test/java/io/openliberty/tools/intellij/it/SingleModMPProjectTestCommon.java @@ -1144,6 +1144,8 @@ public static void prepareEnv(String projectPath, String projectName) { // IntelliJ does not start building and indexing until the Project View is open UIBotTestUtils.waitForIndexing(remoteRobot); UIBotTestUtils.openAndValidateLibertyToolWindow(remoteRobot, projectName); + // Refresh the Liberty tool window using the refresh icon on the toolbar. + UIBotTestUtils.refreshLibertyToolWindow(remoteRobot); UIBotTestUtils.expandLibertyToolWindowProjectTree(remoteRobot, projectName); // Close all open editors. diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index 1ba7103b2..1ee46b5c7 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -2201,39 +2201,15 @@ public static Map getOpenedLibertyConfigDataAndCloseOnExit(Remot public static void selectConfigUsingToolbar(RemoteRobot remoteRobot, String cfgName) { ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10)); ComponentFixture cfgSelectBox = projectFrame.getRunConfigurationsComboBoxButton(); - - boolean configFound = false; - int retryCount = 0; - int maxRetries = 5; - - while (!configFound && retryCount < maxRetries) { - cfgSelectBox.click(); - - ComponentFixture cfgSelectPaneList = projectFrame.getMyList(); - List configs = cfgSelectPaneList.getData().getAll(); - - if (configs != null && !configs.isEmpty()) { - for (RemoteText cfg : configs) { - if (cfg.getText().equals(cfgName)) { - cfg.click(); - configFound = true; - break; - } - } - } - if (!configFound) { - retryCount++; - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new RuntimeException("Thread interrupted while waiting for configuration list", e); - } + cfgSelectBox.click(); + ComponentFixture cfgSelectPaneList = projectFrame.getMyList(); + List configs = cfgSelectPaneList.getData().getAll(); + for (RemoteText cfg : configs) { + if (cfg.getText().equals(cfgName)) { + cfg.click(); + break; } } - if (!configFound) { - throw new RuntimeException("Configuration '" + cfgName + "' not found after " + maxRetries + " attempts."); - } } /**