-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Tests run at incorrect phase in case of integration tests name not ending in "IT" #25070
Comments
In general, it's up to maven-surefire-pugin and maven-failsafe-plugin (not Quarkus!) to decide when/whether to run a specific test. So you should probably tell surefire to exclude (or not include) *IntegrationTest and failsafe to do include *IntegrationTest. Having said that, it might make sense to pre-configure generated Quarkus projects like that. WDYT @geoand @aloubyansky? |
Generated projects are supposed to be templates/starting points that are meant to be further customized. IMO, they should not contain config that isn't common enough. Would most users find this addition useful or redundant? |
That is what @edeandrea's work proposes to do |
I am going to close this, as our documentation clearly states that these tests can only be run by Maven Surefire (or the equivalent Gradle task) |
|
Describe the bug
If an integration test class (
@QuarkusIntegrationTest
) name doesn't end in "IT", the test is run at a wrong phase, and the build fails.Would expect to work correctly with any naming.
Expected behavior
Build should pass irrespective of the naming used for the integration test class. The annotation
@QuarkusIntegrationTest
could already indicate that it is an integration test.Actual behavior
Complete output:
How to Reproduce?
mvn archetype:generate \ -DarchetypeGroupId=io.quarkus \ -DarchetypeArtifactId=quarkus-amazon-lambda-rest-archetype \ -DarchetypeVersion=2.8.1.Final
GreetingIT
toGreetingIntegrationTest
quarkus build --native
, and for some reason the integration test gets run before the plain test, by themaven-surefire-plugin:3.0.0-M5:test
at test phase, and not integration-test phase and failsOutput of
uname -a
orver
Linux XS15-DQJ9ND3 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk 11.0.14 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
GraalVM version (if different from Java)
(using docker to build native)
Quarkus version or git rev
2.8.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: /opt/maven Java version: 11.0.14, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "5.10.16.3-microsoft-standard-wsl2", arch: "amd64", family: "unix"
Additional information
No response
The text was updated successfully, but these errors were encountered: