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

QuarkusMainTest always run even TestProfile's tags do not match #44118

Closed
yuan-kuan opened this issue Oct 26, 2024 · 1 comment · Fixed by #44371
Closed

QuarkusMainTest always run even TestProfile's tags do not match #44118

yuan-kuan opened this issue Oct 26, 2024 · 1 comment · Fixed by #44371
Labels
area/testing kind/bug Something isn't working
Milestone

Comments

@yuan-kuan
Copy link

Describe the bug

Tests annotated with @QuarkusMainTest and @TestProfile will always run despite the TestProfile has a different tags than the settings.

Expected behavior

If the TestProfile's tags do not matched the setting, tests should not run.

Actual behavior

No response

How to Reproduce?

  1. clone my small reproducible project: https://github.com/yuan-kuan/quarkus-test-tags-bug/tree/main
  2. quarkus dev -Dquarkus.test.profile.tags=b
  3. press o and press r to run the unit tests with output on.
  4. Observe that bugTest still run despite it's TestProfile only return 'a' in tags() getter
  5. Restart the Quarkus dev mode: quarkus dev -Dquarkus.test.profile.tags=a
  6. Run the test again
  7. Observe that testOk, which TestProfile has 'b' tag only, will not run.

Output of uname -a or ver

Darwin 24.0.0 Darwin Kernel Version 24.0.0: Wed Aug 7 03:09:57 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T8112 arm64

Output of java -version

openjdk version "21.0.5" 2024-10-15 LTS

Quarkus version or git rev

quarkus 3.15.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)

Additional information

No response

@geoand
Copy link
Contributor

geoand commented Nov 7, 2024

Thanks for the great reproducer!

#44371 fixes the issue

@gsmet gsmet closed this as completed in a82eba2 Nov 7, 2024
gsmet added a commit that referenced this issue Nov 7, 2024
Make @QuarkusMainTest respect `quarkus.test.profile.tags`
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Nov 7, 2024
@gsmet gsmet modified the milestones: 3.17 - main, 3.16.3 Nov 12, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Nov 12, 2024
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants