Skip to content

Conversation

@anusreelakshmi934
Copy link
Contributor

Fixes #1153

Copy link
Contributor

@dessina-devasia dessina-devasia left a comment

Choose a reason for hiding this comment

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

Change Copyright year in all files

@anusreelakshmi934
Copy link
Contributor Author

Change Copyright year in all files

Changed the Copyright year

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.

@anusreelakshmi934 I see several new failures that are occurring on the Linux and Windows builds, for example:

GradleSingleModJakartaLSTest > initializationError FAILED
    java.lang.RuntimeException: Unable to open file SystemResource
        at io.openliberty.tools.intellij.it.UIBotTestUtils.openFile(UIBotTestUtils.java:700)
        at io.openliberty.tools.intellij.it.SingleModJakartaLSTestCommon.prepareEnv(SingleModJakartaLSTestCommon.java:204)
        at io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest.setup(GradleSingleModJakartaLSTest.java:40)

        Caused by:
        java.util.NoSuchElementException: List is empty.
            at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:221)
            at com.intellij.remoterobot.fixtures.Fixture.findText(Fixture.kt:46)
            at io.openliberty.tools.intellij.it.UIBotTestUtils.openFile(UIBotTestUtils.java:687)
            ... 2 more

I suspect these might be related to recent changes in computing paths in this PR. Please verify.

Copy link
Contributor

@TrevCraw TrevCraw left a comment

Choose a reason for hiding this comment

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

There are lots of places where String.join() is used. Would it be possible to pass String arrays as was done before? You can build the String arrays from your existing constants dynamically if needed. Or, in most cases, you can create new constants that combine your existing constants.

For example, you have:

CONFIG_DIR_PATH = { "src", "main", "liberty", "config" };
SERVER_XML = "server.xml";

You can create a new constant that combines the two called SERVER_XML_PATH and then use that to pass as a parameter to the necessary methods.

@anusreelakshmi934
Copy link
Contributor Author

Hi @TrevCraw,
I’ve addressed your comments and made the necessary changes. Please review them when you get a chance and let me know if this aligns with your expectations or if further modifications are needed. Thanks!

Additionally, I’ve removed the WLP_MSGLOG_PATH from the TestUtils file and moved it to the ItConstants file as a slash-separated path. I felt that, instead of calling Paths.get(), it might be more efficient to directly specify the path there. Could you confirm if this approach is appropriate?

Copy link
Contributor

@TrevCraw TrevCraw left a comment

Choose a reason for hiding this comment

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

Hi @anusreelakshmi934 , please address the review comments below. And be sure to check the build results after making your changes.

It probably was not necessary to move MESSAGES_LOG_PATH to the ItConstants file since it is only used in one file. However, the change should be OK. Please take a look at one of the comments related to this change below.

- MPG_PROPERTIES changed to MPCFG_PROPERTIES
- concatenate the Strings for wlpMsgLogPath
vaisakhkannan
vaisakhkannan previously approved these changes Feb 12, 2025
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.

Looks good

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.

@anusreelakshmi934 ,I think it's better to define constants for string literals present in the child test class as well.

@anusreelakshmi934 anusreelakshmi934 marked this pull request as draft March 6, 2025 05:34
@anusreelakshmi934 anusreelakshmi934 marked this pull request as ready for review March 6, 2025 12:28
setBuildCategory(BuildType.GRADLE_TYPE);
setSmMpProjPort(9080);
setSmMpProjResURI("api/resource");
setSmMPProjOutput("Hello! Welcome to Open Liberty");
Copy link
Contributor

Choose a reason for hiding this comment

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

@TrevCraw , @mrglavas Do we need to consider adding "Hello! Welcome to Open Liberty" and "api/resource", etc., to constants?

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.

Add constants for string literals throughout the UI tests.

6 participants