OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
11 stars 24 forks source link

Encountering various Timed out error when running UI tests #887

Open anusreelakshmi934 opened 1 month ago

anusreelakshmi934 commented 1 month ago

When running UI tests in windows some of the tests are failing intermittently with the below errors.

Timed out while waiting for project with resource URI api/resourceand port 9080 to become available.
Timed out waiting for message CWWKE0036I in log:D:\a\liberty-tools-intellij\liberty-tools-intellij\liberty-tools-intellij\src\test\resources\projects\gradle\singleModGradleMP\build\wlp\usr\servers\defaultServer\logs\messages.log
errors.

The error are observed in the following files: testCustomStartParametersClearedOnConfigRemoval testStartWithConfigInDebugModeUsingToolbar testStartWithConfigInRunModeUsingMenu testStartWithParamsActionUsingPopUpMenu testRunTestsActionUsingDropDownMenu testRunTestsActionUsingPopUpMenu testStartWithParamsActionUsingDropDownMenu testStartWithConfigInRunModeUsingToolbar testStartWithConfigInDebugModeUsingMenu testRunTestsActionUsingPlayToolbarButton testStartWithParamsActionUsingSearch

In one of the build an error occured in testQuickFixInServerXML() and testDiagnosticInServerXML() -

java.lang.RuntimeException: Hover on text: 'wrong' did not trigger a pop-up window to open 
Caused by:
        com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT5S) for condition function (Failed to find 'Container' by '//div[@class='HeavyWeightWindow']//div[@class='JEditorPane']' in 5s) 

Also we get the following errors in some builds testInsertJakartaCodeSnippetIntoJavaPart() FAILED

com.intellij.remoterobot.client.IdeaSideException
    Caused by:
        java.lang.Throwable: component must be showing on the screen to determine its location

testMPQuickFixInJavaFile() FAILED

    java.lang.RuntimeException: Hover on text: 'ServiceLiveHealthCheck' did not trigger a pop-up window to open
Caused by:
        com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT5S) for condition function (Failed to find 'Container' by '//div[@class='HeavyWeightWindow']//div[@class='JEditorPane']' in 5s) 

In some rare builds we are facing initializationError- FAILED These timed out errors are also intermittently occuring in some linux buils

List of tests failed.

aparnamichael commented 1 month ago

testCustomStartParametersClearedOnConfigRemoval - Timeout error is because after 'cd command' it is not executing gradle start command. (gradlew libertyDev --libertyDebugPort=9876). Not able to reproduce in our local windows machine. But in GHA it is failing inconsistently due to this timeout issue.

image

aparnamichael commented 3 weeks ago

Details of windows test executed - https://ibm.box.com/s/x31nsrev91x22mrwz04rjc7nn92up5s8

aparnamichael commented 3 weeks ago

Tested with 40 windows build. Out of 40, 33 of them were green builds.

Links

This branch contains intellij version update to 2024.1.6 update and Paul’s fix for jdk indexing.

  1. Most of the test failures start from 'custom start' tests, in that sometimes dev mode is getting stuck. As a result, subsequent tests are also failing because the dev mode is not able to stop.

image

  1. Out of 40 builds, the MP test failed only once due to the diagnostic message popup. java.lang.RuntimeException: Hover on text: ServiceLiveHealthCheck did not trigger a pop-up window to open

image

Detailed test results - https://ibm.box.com/s/x31nsrev91x22mrwz04rjc7nn92up5s8

aparnamichael commented 2 weeks ago

Next steps:

  1. Try to reproduce locally by doing the same steps manually.
  2. Check how much time it takes to complete searching in messages.log for the success tests.