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

QuarkusIntegrationTests fails while testing jar #17812

Closed
javiertoja opened this issue Jun 9, 2021 · 2 comments
Closed

QuarkusIntegrationTests fails while testing jar #17812

javiertoja opened this issue Jun 9, 2021 · 2 comments
Labels
area/testing kind/bug Something isn't working triage/invalid This doesn't seem right

Comments

@javiertoja
Copy link
Contributor

javiertoja commented Jun 9, 2021

Describe the bug

I'm not completely sure if this is a bug or I'm should do some additional setup.

While trying to complete a maven build to test the QuarkusIntegrationTests annotation having only one test with this annotation, the build fails with the error java.lang.IllegalStateException: Unable to locate the artifact metadata file created that must be created by Quarkus in order to run tests annotated with '@QuarkusIntegrationTest'.

Expected behavior

I expected that executing mvn -B verify --file quarkus/integration-test/pom.xml the test will pass without errors

Actual behavior

The build fails with the error java.lang.IllegalStateException: Unable to locate the artifact metadata file created that must be created by Quarkus in order to run tests annotated with '@QuarkusIntegrationTest'.

To Reproduce

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Project to reproduce the issue

Steps to reproduce the behavior:

  1. Setup java 16 and maven
  2. Execute mvn -B verify --file quarkus/integration-test/pom.xml
## Environment (please complete the following information):

### Output of `uname -a` or `ver`
Linux nidavellir 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
### Output of `java -version`
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)

### GraalVM version (if different from Java)

### Quarkus version or git rev
1.3.7.Final
### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /home/XXXX/.m2/wrapper/dists/apache-maven-3.8.1-bin/2l5mhf2pq2clrde7f7qp1rdt5m/apache-maven-3.8.1
Java version: 16.0.1, vendor: AdoptOpenJDK, runtime: /home/XXXX/.sdkman/candidates/java/16.0.1.hs-adpt
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-74-generic", arch: "amd64", family: "unix"

Additional context

If mixed with the sample GreetingsResource unit test, the execution of the Integration tests fails because while trying to start the application with java -jar, the process finds the testing port occupied by the execution of the unit test, which stills holds the port.

Error reproduced with a github action build.

@javiertoja javiertoja added the kind/bug Something isn't working label Jun 9, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 9, 2021

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Jun 10, 2021

Tests annotated with @QuarkusIntegrationTest should be run by the maven-failsafe-plugin in the verify phase, not by maven-surefire-plugin in the test phase (same as the @NativeImageTest).

I have added a note in the documentation to make that more clear

@geoand geoand closed this as completed Jun 10, 2021
@geoand geoand added the triage/invalid This doesn't seem right label Jun 10, 2021
geoand added a commit that referenced this issue Jun 10, 2021
Add note in guide about @QuarkusIntegrationTest and the test phase
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Something isn't working triage/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants