@Scheduled method in test class not supported anymore #33286
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
Affects: 6.1.9+
Since Spring 6.1.9 (and I believe since #33009), it's not possible to declare a
@Scheduled
method directly in a test class because the following exception is thrown when the test is run:It's not blocking because as a workaround one can refactore the test by moving the
@Scheduled
method into a new@Component
for example but it's still a regression.Demo: https://github.com/romainmoreau/scheduled-in-test-regression
The text was updated successfully, but these errors were encountered: