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

Consider reverting breaking change about test configuration #19058

Closed
melix opened this issue Nov 19, 2021 · 2 comments · Fixed by #19087
Closed

Consider reverting breaking change about test configuration #19058

melix opened this issue Nov 19, 2021 · 2 comments · Fixed by #19087
Assignees
Labels
a:regression This used to work @core Issue owned by GBT Core in:test-suites Work related to the JvmTestSuite Plugin in:testing
Milestone

Comments

@melix
Copy link
Contributor

melix commented Nov 19, 2021

Expected Behavior

As discussed with @ljacomet, the change to test framework configuration documented here is a major breaking change. It should probably have been a warning instead.

Current Behavior

Upgrading a passing build to Gradle 7.3 breaks. See micronaut-projects/micronaut-gradle-plugin#296
Any build generated by Micronaut in the past which doesn't configure a test framework explicitly is going to fail when upgrading to Gradle 7.3. Basically it means most of the builds generated, via launch.micronaut.io or the CLI tool, since if you say nothing Micronaut will use JUnit Platform..

Context

The problem is that builds which used to pass, even if we understand that they were probably not configured as expected, now break. We have multiple users all reporting the same issue. In addition, it's actually pretty hard to figure out why this is happening. In other words, it would be nice if Gradle captured where the options block is configured, so that instead of failing:

  • it produces a warning that the previous configuration will be discarded
  • it tells what configured the old options, so that we can trace back to what code was triggered too early

Later, possibly in 8.0, make this an error.

Steps to Reproduce

See micronaut-projects/micronaut-gradle-plugin#296 for a reproducer and workaround.

@melix melix added a:regression This used to work to-triage labels Nov 19, 2021
@octylFractal octylFractal added @core Issue owned by GBT Core in:test-suites Work related to the JvmTestSuite Plugin in:testing and removed to-triage labels Nov 19, 2021
@big-guy big-guy added this to the 7.3.1 milestone Nov 19, 2021
@tresat
Copy link
Member

tresat commented Nov 22, 2021

After some internal discussion, we're going to be restoring the previous behavior here in a forthcoming 7.3.1 release.

As noted, this behavior is misleading, since test options which are configured prior to setting a testing framework will be discarded. We will add a warning when this occurs, and will re-remove this behavior in the next major release so that this situation once again fails fast rather than giving a false impression that options have been configured.

We're sorry for any inconvenience this may have caused, we didn't realize this would affect so many projects.

@ljacomet
Copy link
Member

Closing as this has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:regression This used to work @core Issue owned by GBT Core in:test-suites Work related to the JvmTestSuite Plugin in:testing
Projects
None yet
5 participants