hk2166 opened a new issue, #16671:
URL: https://github.com/apache/grails-core/issues/16671

   ### Expected Behavior
   
   Test classes in `grails-test-suite-uber` and `grails-test-suite-persistence` 
that extend `AbstractGrailsMockTests` should be discovered and run by 
`./gradlew test`.
   
   ### Actual Behaviour
   
   `AbstractGrailsMockTests` extends `GroovyTestCase` (JUnit 3 style), but both 
modules only have `junit-jupiter-engine` on the test runtime classpath. Its 
subclasses are never discovered, so 16 test methods in 4 classes have silently 
not run, likely since the suites moved to the JUnit Platform in 4.1.0 (#11520):
   
   - `grails-test-suite-uber`: `CoreGrailsPluginTests` (4 tests), 
`DefaultGrailsPluginTests` (9)
   - `grails-test-suite-persistence`: `DataSourcesGrailsPluginTests` (2), 
`ScopedProxyAndServiceClassTests` (1)
   
   When I added `junit-vintage-engine` locally, 15 of the 16 pass. 
`DefaultGrailsPluginTests.testDoWithRuntimeConfiguration` fails at line 177: 
the plugin that overrides `invokeMethod` (`versioned3`) no longer registers its 
`classEditor` bean. That's either a regression or an outdated expectation.
   
   Related to #16289 (modules silently running zero tests).
   
   ### Steps To Reproduce
   
   1. Check out `7.0.x` (the same applies to 7.1.x, 7.2.x, 8.0.x, 8.1.x and 
9.0.x).
   2. Run `./gradlew :grails-test-suite-uber:test --tests 
org.grails.plugins.CoreGrailsPluginTests`
   3. The build fails with `No tests found for given includes: 
[org.grails.plugins.CoreGrailsPluginTests](--tests filter)`. The same happens 
for `DefaultGrailsPluginTests`, and in `:grails-test-suite-persistence:test` 
for `DataSourcesGrailsPluginTests` and `ScopedProxyAndServiceClassTests`.
   4. Optional: add `testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'` 
to both modules' `build.gradle` and run them again. 15 of 16 pass, and 
`DefaultGrailsPluginTests.testDoWithRuntimeConfiguration` fails.
   
   ### Environment Information
   
   - Operating System: macOS 27.0.1
   - JDK Version: 17.0.17 (reproduced on 7.0.x). The other branches have the 
same base class and no Vintage engine, which I checked in the source.
   
   ### Example Application
   
   _No response_
   
   ### Version
   
   7.0.x, 7.1.x, 7.2.x, 8.0.x, 8.1.x, 9.0.x (framework test suites; likely 
since 4.1.0)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to