Skip to content

Including gradle testFixtures also includes implementation code in tests since 3.22 #48051

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

Open
ls-bit opened this issue May 26, 2025 · 1 comment
Labels
area/gradle Gradle env/windows Impacts Windows machines kind/bug Something isn't working

Comments

@ls-bit
Copy link
Contributor

ls-bit commented May 26, 2025

Describe the bug

Since 3.22 when including test fixtures from a library with testImplementation(testFixtures(project(":some-library"))), also regular code from the library is included in the tests besides the test fixtures.

This leads to suprising behaviour such as @Startup methods from the library being executed in tests, but not in dev mode.

Expected behavior

Including test fixtures with testImplementation(testFixtures(project(":some-library"))) only includes test fixtures of the library

Actual behavior

Including test fixtures with testImplementation(testFixtures(project(":some-library"))) includes test fixtures and regular code of the library

How to Reproduce?

https://github.com/ls-bit/quarkus-issue-48048

  1. Running ./gradlew module-app:test fails

Output of uname -a or ver

Microsoft Windows [Version 10.0.26100.3775]

Output of java -version

openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)

Quarkus version or git rev

3.22.3

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

Gradle 8.13

Additional information

Probably related to https://quarkus.io/blog/test-classloading-rewrite/

@ls-bit ls-bit added the kind/bug Something isn't working label May 26, 2025
@quarkus-bot quarkus-bot bot added area/gradle Gradle env/windows Impacts Windows machines labels May 26, 2025
Copy link

quarkus-bot bot commented May 26, 2025

/cc @glefloch, @quarkusio/devtools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant