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

QACI-242 Payara Samples Tests Are Attempting to Run Micro Tests for Remote Profile #4692

Merged
merged 3 commits into from
Jun 2, 2020

Conversation

AlanRoth
Copy link

@AlanRoth AlanRoth commented Jun 2, 2020

Description

Quick fix to stop micro tests on running on remote profile

Testing

Testing Performed

Tested and passed locally

Ran maven clean install;

mvn -V -B -fae help:active-profiles clean install -f appserver/tests/payara-samples -Dpayara.version=5.2020.2-SNAPSHOT -Dpayara_domain=test-domain -Dglassfish.home=/home/alanroth/Workspace/Payara/appserver/distributions/payara/target/stage/payara5 -Ppayara-server-remote

Testing Environment

Openjdk 11.0.7
Ubuntu 64 bit
Maven 3.6.3

Notes for Reviewers

This isn't designed to be a permanent solution, origionally planned on having a annotation like 'NotMicroCompatible' but for remote, 'NotRemoteCompatible'


<profiles>
<profile>
<id>payara-server-remote</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

Samples is only run against remote so shouldn't need to have a separate profile for this - just in default

Copy link
Author

Choose a reason for hiding this comment

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

Isn't the default profile managed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe in the poms but we only run samples on remote

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it would be imprudent to assume that will always be the case though

Copy link
Author

Choose a reason for hiding this comment

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

I completely understand what you mean though 😀

Copy link
Contributor

Choose a reason for hiding this comment

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

going forward it needs to be run over all profiles

<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>${exclude.tests}</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

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

Exclude explicitly rather than using a property? Or possibly exclude the module from the list of included modules if that's how the project is set up

Copy link
Author

Choose a reason for hiding this comment

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

We want the tests to run when not using remote profile

Copy link
Contributor

Choose a reason for hiding this comment

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

See above comment

Copy link
Author

Choose a reason for hiding this comment

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

I could exclude the module instead, but I dont think its neccessery

Copy link
Contributor

@dmatej dmatej left a comment

Choose a reason for hiding this comment

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

What about
mvn clean verify -pl :payara-samples-profiled-tests -Ppayara-server-remote
instead of adding a profile where it makes no sense?

@AlanRoth
Copy link
Author

AlanRoth commented Jun 2, 2020

What about
mvn clean verify -pl :payara-samples-profiled-tests -Ppayara-server-remote
instead of adding a profile where it makes no sense?

The mvn command I used is the one jenkins uses, which is where we had the problems, which is why it might not make much sense.

mvn clean verify -pl :payara-samples-profiled-tests -Ppayara-server-remote Builds successfully

@dmatej
Copy link
Contributor

dmatej commented Jun 2, 2020

It is the reason why those "programmatical" tests are separated from "profiled" tests. Now you created a profile with the same name in "programmatical" build branch where those profiles intentionally don't exist.
The mistake was in jenkinsfile, not in Maven.

@cubastanley
Copy link
Contributor

cubastanley commented Jun 2, 2020

Should we be changing the jenkins command for samples in that case then? Rather than the test profiles

@AlanRoth
Copy link
Author

AlanRoth commented Jun 2, 2020

From what David's saying, yes

@AlanRoth AlanRoth requested review from dmatej and cubastanley June 2, 2020 12:17
@MarkWareham
Copy link
Contributor

jenkins test please

@AlanRoth AlanRoth merged commit 1526738 into payara:master Jun 2, 2020
@dmatej
Copy link
Contributor

dmatej commented Jun 2, 2020

Approving too, despite too late ;)

Pandrex247 pushed a commit to Pandrex247/Payara that referenced this pull request Jun 15, 2020
QACI-242 Payara Samples Tests Are Attempting to Run Micro Tests for Remote Profile
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.

4 participants