Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for Liberty modules to use in Run/Debug config #1216

Merged
merged 12 commits into from
Jan 16, 2025

Conversation

turkeylurkey
Copy link
Member

@turkeylurkey turkeylurkey commented Jan 9, 2025

The fix for the bug is in LibertyRunConfiguration but to get that new method the logic needed to be extracted from the class LibertyExplorer. See the comment in the issue.

In the process of refactoring that method (buildTree()) I noticed that two loops did almost the same things for Gradle and Maven files so I combined them into one loop. A lot of code was removed. Also the module code that moved from LibertyExplorer to LibertyModules was two loops and they were combined into one. I added data validation to the class BuildFile mainly to document the acceptable values but also to ensure correctness.

I noticed that some error statements in the test log did not indicate that the test was going to retry and this confused me so I took the opportunity to change the output string by adding the word "Retrying..." like the other tests.

Fixes #1202

@turkeylurkey
Copy link
Member Author

I tried to simplify the nested lambdas in LibertyProjectUtil.readIndex().

@turkeylurkey turkeylurkey marked this pull request as draft January 9, 2025 19:41
@turkeylurkey
Copy link
Member Author

Investigating test failures.

@turkeylurkey turkeylurkey marked this pull request as ready for review January 11, 2025 05:02
@turkeylurkey
Copy link
Member Author

Latest #5

Mac: MyList

MavenSingleModMPProjectTest > testMultipleConfigEditHistory() FAILED
com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT10S) for condition function (Failed to find 'Container' by '//div[@Class='HeavyWeightWindow']//div[@Class='MyList']' in 10s)

at io.openliberty.tools.intellij.it.fixtures.ProjectFrameFixture.getMyList(ProjectFrameFixture.java:338)
152 tests completed, 1 failed, 16 skipped

Windows: messages.log

GradleSingleModMPProjectTest > testCustomStartParametersClearedOnConfigRemoval() FAILED
org.opentest4j.AssertionFailedError: testCustomStartParametersClearedOnConfigRemoval:validateLibertyServerStopped: Exit. 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

at io.openliberty.tools.intellij.it.TestUtils.validateLibertyServerStopped(TestUtils.java:106)
152 tests completed, 1 failed, 16 skipped

@turkeylurkey
Copy link
Member Author

turkeylurkey commented Jan 13, 2025

Since commit 35c3458 was added Linux passed and Windows failed with the same error as in the comment above ("Timed out waiting for message CWWKE0036I"). Mac: "Timed out waiting for message CWWKE0036I" and testMultipleConfigEditHistory().

Copy link
Contributor

@vaisakhkannan vaisakhkannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@mrglavas mrglavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the demo. Looks good. I had a few minor comments, but shouldn't stop you from merging now.

@turkeylurkey turkeylurkey merged commit 034fa10 into OpenLiberty:main Jan 16, 2025
3 checks passed
@turkeylurkey turkeylurkey deleted the issue-1202 branch January 16, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.NullPointerException occurs when adding a configuration to a newly created project.
4 participants