You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During a Maven build currently no tests are executed in Spring Batch Core as Maven Surefire chooses the provider for JUnit 5 while all tests are written in JUnit 4 and the JUnit 5 vintage engine is not on the classpath. This can be verified by executing e.g.
The artifact micrometer-test artifact has transitive dependencies on JUnit Jupiter which leads to Maven Surefire using a Junit 5 provider instead of Junit 4. And the JUnit 5 provider silently ignores the JUnit 4 tests without the vintage engine.
Tests have started failing with the commit 31af573. Since then, some other commit has led to failures in JobLoaderConfigurationTests which did not fail in this commit.
Possible fixes for the build
I think the best solution to get the build working again is to add the JUnit Vintage Engine to Spring Batch Core. If it's added, the tests are again executed as expected.
Alternatively, JUnit Jupiter dependencies could be excluded from micrometer-test. This works too but the problem might resurface easily.
The text was updated successfully, but these errors were encountered:
These tests seem to start failing since 31af573 but were
not caught due to #4121. This commit fixes the tests that
are related to infrastructure beans configuration.
Some other tests seems to have started failing as well but
are not related to this change set. There were temporarily
ignored in this commit and will be addressed separately.
Issue #4121
Issue
There are failing tests in Spring Batch Core. Both on the main branch and in the release 5.0.0-M3. They are in the classes
InlineDataSourceDefinitionTests
JobBuilderConfigurationTests
JobLoaderConfigurationTests
TransactionManagerConfigurationWithBatchConfigurerTests
TransactionManagerConfigurationWithoutBatchConfigurerTests
ConcurrentTransactionTests
During a Maven build currently no tests are executed in Spring Batch Core as Maven Surefire chooses the provider for JUnit 5 while all tests are written in JUnit 4 and the JUnit 5 vintage engine is not on the classpath. This can be verified by executing e.g.
Root cause
The tests have been effectively disabled in #4065 by the change in the
pom.xml
of Spring Batch Core: https://github.com/spring-projects/spring-batch/pull/4065/files#diff-690b0d85920e9a80c4b4883c05b470e89b6bcd42f5721e38625d25b638a548a6The artifact
micrometer-test
artifact has transitive dependencies on JUnit Jupiter which leads to Maven Surefire using a Junit 5 provider instead of Junit 4. And the JUnit 5 provider silently ignores the JUnit 4 tests without the vintage engine.Tests have started failing with the commit 31af573. Since then, some other commit has led to failures in
JobLoaderConfigurationTests
which did not fail in this commit.Possible fixes for the build
I think the best solution to get the build working again is to add the JUnit Vintage Engine to Spring Batch Core. If it's added, the tests are again executed as expected.
Alternatively, JUnit Jupiter dependencies could be excluded from
micrometer-test
. This works too but the problem might resurface easily.The text was updated successfully, but these errors were encountered: