Commit Graph

5924 Commits

Author SHA1 Message Date
Tadaya Tsuyukubo
1ff720545f Adapt SampleTestRunner change in micrometer tracing
Accommodate the breaking change in `SampleTestRunner` introduced by
https://github.com/micrometer-metrics/tracing/pull/57
2022-09-09 15:38:30 +02:00
Mahmoud Ben Hassine
7c8fb172a7 Move the transaction manager configuration to AbstractTaskletStepBuilder
Before this commit, the transaction manager was configurable
at the StepBuilder level, which is inconsistent with the XML
config style in addition to be not needed for most step types.

This commit moves the configuration of the transaction manager
from the StepBuilder down to the AbstractTaskletStepBuilder,
which is the level where the transaction manager is needed.

Resolves #4130
2022-09-08 11:35:14 +02:00
Mahmoud Ben Hassine
55af86df59 Update micrometer dependencies to latest snapshots 2022-09-07 17:05:06 +02:00
Mahmoud Ben Hassine
4d548d9a49 Exclude junit-jupiter from micrometer test dependencies 2022-09-07 17:05:06 +02:00
Mahmoud Ben Hassine
42b1b2f2c9 Put back "Replace ListenableFuture with CompletableFuture"
Related to a165247284.
2022-08-24 20:08:14 +02:00
Mahmoud Ben Hassine
bd25df6770 Put back "Fix StepScopeProxyTargetClassOverrideIntegrationTests"
Related to bbf7086765.
2022-08-24 20:07:21 +02:00
Mahmoud Ben Hassine
2f7a3943ff Update Spring dependencies to latest snapshots 2022-08-24 20:06:36 +02:00
Spring Builds
878578f829 [artifactory-release] Next development version 2022-08-24 17:14:59 +00:00
Spring Builds
7fc0af6785 [artifactory-release] Release version 5.0.0-M5 2022-08-24 17:14:56 +00:00
Mahmoud Ben Hassine
f7ca108cff Update "what's new section" for 5.0.0-M5 2022-08-24 18:28:09 +02:00
Mahmoud Ben Hassine
bbf7086765 Revert "Fix StepScopeProxyTargetClassOverrideIntegrationTests"
This reverts commit bf2e6ab0e5
as the change was made after spring-framework 6.0.0-M5 was
released. This version is required to release spring-batch
5.0.0-M5

This change will be put back after releasing 5.0.0-M5.
2022-08-24 18:11:18 +02:00
Mahmoud Ben Hassine
a165247284 Revert "Replace ListenableFuture with CompletableFuture"
This reverts commit a2cf74ad as the change was made after
spring-kafka 3.0.0-M5 was released. This version is required
to release spring-batch 5.0.0-M5

This change will be put back after releasing 5.0.0-M5.
2022-08-24 18:09:29 +02:00
Mahmoud Ben Hassine
b524e3287f Update dependencies
Update deps

Update deps2
2022-08-24 18:09:29 +02:00
Henning Poettker
6bbd9d8379 Fix non-nullable columns in MySQL migration for Spring Batch 4.3
Issue #4145
2022-08-24 15:57:46 +02:00
Mahmoud Ben Hassine
0a75bc7d84 Deprecate Hibernate support
Resolves #4150
2022-08-24 15:49:29 +02:00
Mahmoud Ben Hassine
4d0ed63dd7 Deprecate AssertFile
Resolves #4181
2022-08-24 15:17:34 +02:00
Mahmoud Ben Hassine
7e535afb73 Refine contribution #4112
Revert the removal of `@SpringJUnitConfig`
usage in the test suite of samples.

Related to #4111
2022-08-24 10:37:02 +02:00
Glenn Renfro
8ca9802da4 Remove the JUnit dependency in AssertFile
The side effect is a breaking change in that it will now
throw IllegalStateException instead of the Compare and
AssertExceptions provided by JUnit.

Resolves #4111
2022-08-24 10:29:45 +02:00
Mahmoud Ben Hassine
c425137eec Remove datasource dependency in JobRepositoryTestUtils
Before this commit, the `JobRepositoryTestUtils` was
tied to the JDBC implementation of the `JobRepository`
as it was requiring a datasource. This makes it unusable
with implementations that do not rely on a datasource
to store batch meta-data (A MongoDB job repository for
instance where no datasource is used).

This commit decouples the `JobRepositoryTestUtils` from
the implementation details of the `JobRepository` by making
it working against the `JobRepository` interface.

This commit also introduces the necessary methods in the
`JobRepository` interface as well as various DAOs to
implement the utilities without having to deal with the
details of the underlying repository implementation.

Resolves #4070
2022-08-23 21:33:06 +02:00
Mahmoud Ben Hassine
f104baa417 Remove datasource autowiring in JobRepositoryTestUtils
Before this commit, trying to register a `JobRepositoryTestUtils` bean
in a test context that contains multiple datasources fails at startup,
because a datasource is autowired in `JobRepositoryTestUtils` while
multiple are defined.

This commit removes the autowiring of the datasource in JobRepositoryTestUtils.

Resolves #4178
2022-08-21 13:36:37 +02:00
Mahmoud Ben Hassine
fe40370f39 Refine contribution #4167
The documentation generation change introduced
in #4167 seems to scan more files than previously
WRT checking the code formatting style.

This commit fixes the formatting of the files
that do not conform to the Spring style.
2022-08-21 09:52:35 +02:00
Jay Bryant
f89aa20861 Use spring-asciidoctor-backends for documentation generation
Resolves #3865
2022-08-21 09:44:12 +02:00
Mahmoud Ben Hassine
c506a49988 Remove job autowiring in JobLauncherTestUtils
Before this commit, registering the JobLauncherTestUtils
as a bean in the test context (either manually or via
`@SpringBatchTest`) was failing when multiple jobs are
defined in the test context.

This commit removes the autowiring of the job under test
in JobLauncherTestUtils.

Resolves #1237
2022-08-20 12:39:02 +02:00
Mahmoud Ben Hassine
e67c0069f1 Use the Chunk API consistently
This commit replaces the usage of List with Chunk
where appropriate. Summary of changes:

- The Chunk class was moved from the `org.springframework.batch.core.step.item` package to the `org.springframework.batch.item` package
- The signature of the method `ItemWriter#write(List)` was changed to `ItemWriter#write(Chunk)`
- All implementations of `ItemWriter` were updated to use the Chunk API instead of List
- All methods in the `ItemWriteListener` interface were updated to use the Chunk API instead of List
- All implementations of `ItemWriteListener` were updated to use the Chunk API instead of List
- The constructor of `ChunkRequest` was changed to accept a Chunk instead of a Collection of items
- The return type of `ChunkRequest#getItems()` was changed from List to Chunk

Resolves #3954
2022-08-19 13:40:09 +02:00
Mahmoud Ben Hassine
bf2e6ab0e5 Fix StepScopeProxyTargetClassOverrideIntegrationTests
This test started failing after an upstream change in Spring Framework,
see https://github.com/spring-projects/spring-framework/issues/28115
2022-08-16 11:49:30 +02:00
Mahmoud Ben Hassine
c8f24888a7 Upgrade micrometer core to 1.10.0-M4 and tracing to 1.10.0-M7 2022-08-10 11:45:17 +02:00
Mahmoud Ben Hassine
14b443bc64 Fix formatting 2022-08-10 11:38:58 +02:00
Mahmoud Ben Hassine
9211c2d211 Make MessageChannelPartitionHandler extend AbstractPartitionHandler 2022-08-03 10:52:36 +02:00
Henning Poettker
2fdb68d28e Migrate Spring Batch Core to JUnit Jupiter 2022-08-02 21:25:54 +02:00
Mahmoud Ben Hassine
feefc1cd9e Upgrade maven-failsafe-plugin to version 3.0.0-M7
Similar to f5041e6d70
2022-08-02 18:42:50 +02:00
Henning Poettker
ae5ffd273a Migrate Spring Batch Integration to JUnit Jupiter 2022-08-02 18:24:15 +02:00
Henning Poettker
e4056b4234 Polish Spring Batch Infrastructure tests 2022-08-02 18:08:36 +02:00
Henning Poettker
1e4a23e3eb Migrate Spring Batch Samples to JUnit Jupiter 2022-08-02 17:18:12 +02:00
Henning Poettker
6117c044fb Migrate Spring Batch Test to JUnit Jupiter 2022-08-02 17:07:43 +02:00
Henning Poettker
f14d57f264 Fix RecordFieldExtractorTests 2022-08-02 16:18:35 +02:00
Mahmoud Ben Hassine
f5041e6d70 Upgrade maven-surefire-plugin to version 3.0.0-M7
This is to fix the following error:

```
java.lang.NoSuchMethodError: 'org.junit.platform.engine.ConfigurationParameters org.junit.platform.launcher.TestPlan.getConfigurationParameters()'
	at org.springframework.kafka.test.junit.GlobalEmbeddedKafkaTestExecutionListener.testPlanExecutionStarted(GlobalEmbeddedKafkaTestExecutionListener.java:91)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.lambda$testPlanExecutionStarted$6(TestExecutionListenerRegistry.java:97)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry.notifyTestExecutionListeners(TestExecutionListenerRegistry.java:59)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry.access$100(TestExecutionListenerRegistry.java:28)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.testPlanExecutionStarted(TestExecutionListenerRegistry.java:97)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:183)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
```

`org.junit.platform.launcher.TestPlan.getConfigurationParameters()` was
introduced in `junit-platform-launcher:1.8`, and `maven-surefire-plugin`
upgraded to that version in `3.0.0-M6` [1].

[1]: https://issues.apache.org/jira/browse/SUREFIRE-1935
2022-07-27 18:43:27 +02:00
Mahmoud Ben Hassine
4cb15ca837 Fix breaking changes in micrometer APIs
Related to https://github.com/micrometer-metrics/micrometer/pull/3310
2022-07-27 15:31:18 +02:00
Mahmoud Ben Hassine
932e93428e Refine #4125
* Fix assertions
* Update RecordFieldExtractorTests to use JUnit Jupiter
2022-07-27 15:28:04 +02:00
Henning Poettker
83d01fbfca Migrate Spring Batch Infrastructure to JUnit Jupiter
Issue #4125
2022-07-27 15:26:22 +02:00
Mahmoud Ben Hassine
30166a8aae Revert "Improve generic type handling in RepositoryItemReader"
This reverts commit a30aaac4be
which had the side effect of no longer being able to use queries
in `RepositoryItemReader` that return a different type than the
repository's entity type.

Resolves #4164
2022-07-26 07:00:22 +02:00
Mahmoud Ben Hassine
96c6367dae Replace KeyValuesProvider with ObservationConvention
Related to https://github.com/micrometer-metrics/micrometer/pull/3306
2022-07-26 06:55:39 +02:00
Henning Poettker
a2cf74adec Replace ListenableFuture with CompletableFuture
Related to https://github.com/spring-projects/spring-kafka/issues/2357
2022-07-26 06:39:19 +02:00
Glenn Renfro
ee7d12671b Updated Batch Metrics to use DefaultMeterObservationHandler
instead of TimerObservationHandler
2022-07-21 11:32:35 +02:00
Fadhel Mahmoud Ben Hassine
e3ddce6938 Update Spring dependencies to latest snapshots 2022-07-21 11:29:26 +02:00
Spring Builds
08adb4550a [artifactory-release] Next development version 2022-07-21 03:17:06 +00:00
Spring Builds
d46aeef01d [artifactory-release] Release version 5.0.0-M4 2022-07-21 03:17:03 +00:00
Fadhel Mahmoud Ben Hassine
d328e43948 Fix Javadoc errors 2022-07-21 04:47:59 +02:00
Fadhel Mahmoud Ben Hassine
9326398a44 Prepare release 5.0.0-M4 2022-07-20 23:34:11 +02:00
Fadhel Mahmoud Ben Hassine
9d322e9de2 Update whatsnew.adoc 2022-07-20 23:32:12 +02:00
Taeik Lim
ed945ca61d Add @FunctionalInterface where appropriate
Resolves #4107
2022-07-20 19:05:36 +02:00