Commit Graph

82 Commits

Author SHA1 Message Date
Starchenko Ilya
ad92d2a6c9 Fix Javadoc of SpringBatchTest annotation
fix double @-symbol in javadoc

Issue #4102
2022-04-27 15:14:20 +02:00
Mahmoud Ben Hassine
e5c752b4b8 Remove JSR-352 implementation
Resolves #3894
2021-12-13 09:57:48 +01:00
Mahmoud Ben Hassine
5dc17b190e Upgrade dependencies to major versions for Spring Batch 5
* Upgrade to Jakarta EE 9
* Upgrade to Spring Framework 6
* Upgrade to Spring Integration 6
* Upgrade to Spring Data 3
* Upgrade to Spring AMQP 3
* Upgrade to Spring for Apache Kafka 3

LDIF support is still in progress waiting for the next
major version of Spring LDAP.

Closes #4027
Closes #3656
2021-11-22 12:16:49 +01:00
Mahmoud Ben Hassine
385ec9fec0 Implement equals/hashcode in BatchTestContextCustomizer
Resolves #3940
2021-09-13 21:49:24 +02:00
Mahmoud Ben Hassine
e8bbde10e5 Remove unused imports 2021-09-12 22:23:56 +02:00
Mahmoud Ben Hassine
f85a662ebf Refine contribution #3934
* Add default methods in all listener interfaces
* Remove usage of newly deprecated support classes

Issue #3924
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Philippe Marschall
1480dc5fd2 Use default methods in TestExecutionListener
Remove empty implementation methods.
2021-08-12 21:49:05 +02:00
Philippe Marschall
6d5a4d5352 Remove Reflection from StepScopeTestExecutionListener
Call methods on TestContext directly
2021-08-11 20:32:21 +02:00
Marten Deinum
b7d144c10d Added isXXXEnabled for logging statements
Guarded the logging statements which do concatenation of strings
or calling toString on objects. When a log level isn't enabled
this still would produce garbage that would need to be collected.

Guarded all logging up to info, warn and error can be assumed to be
enabled on a production system.
2021-03-17 14:50:57 +01:00
Mahmoud Ben Hassine
15d24b370f Update documentation with expected configuration to use @SpringBatchTest
Resolves #3699
2020-10-02 23:49:21 +02:00
Mahmoud Ben Hassine
c225c683a1 Polish 60bbc0052a
* Remove unused imports
* Update Javadoc
* Update year in license headers
2020-07-24 13:58:05 +02:00
이동욱
60bbc0052a Add getUniqueJobParametersBuilder() method in JobLauncherTestUtils
Issue #767
2020-07-24 13:48:39 +02:00
Mahmoud Ben Hassine
511e6c0f12 Polish 670b6408da
* Update year in license headers
* Update Javadoc
* Remove unused field JOB_PARAMETER_MAXIMUM
* Make SecureRandom an instance variable
2020-05-19 10:16:28 +02:00
Saikat Bhadra
670b6408da Change getUniqueJobParameters() to use random number generator that has a lower chance of repeating
Issue #821
2020-05-19 10:04:47 +02:00
Mahmoud Ben Hassine
fe51fde3a0 Meta-annotate @SpringBatchTest with @ExtendWith(SpringExtension.class)
Resolves #3647
2020-04-30 17:33:37 +02:00
Spring Operator
d8fc58338d URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1796 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 10:08:19 +01:00
Sam Brannen
d9bbb0ecda Simplify BatchTestContextCustomizerFactory
Since @SpringBatchTest is effectively a marker annotation from the
perspective of BatchTestContextCustomizerFactory, there is no need
to retrieve the merged, synthesized annotation.

Checking for the presence of @SpringBatchTest is sufficient.
2019-03-14 12:04:32 +01:00
Drummond Dawson
42c0614742 Replace explicit type with diamond operator in test module 2018-11-06 21:30:36 +01:00
Mahmoud Ben Hassine
70d0e3c510 Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
2018-08-31 15:11:50 -05:00
Mahmoud Ben Hassine
909231c577 Polish 305b4b8b03 2018-08-13 10:34:44 +02:00
Drummond Dawson
305b4b8b03 BATCH-2698: Remove commons io from test module
Prefer Files.lines over common io's readLines
2018-08-13 09:53:08 +02:00
Mahmoud Ben Hassine
0dab67c936 Add a new annotation @SpringBatchTest to simplify testing
This commit adds a new annotation `@SpringBatchTest` that:

* configures two beans `JobLauncherTestUtils` and `JobRepositoryTestUtils`
in the test context.

* imports the `StepScopeTestExecutionListener` and
`JobScopeTestExecutionListener` as test execution listeners.

Resolves BATCH-2718
2018-05-30 13:41:20 -05:00
Michael Minella
b180c75ce0 Housecleaning of build warnings 2017-09-15 15:58:22 -05:00
Glenn Renfro
6bdbe3029e Remove JavaDoc warnings part 2 2017-09-12 10:52:22 -05:00
Michael Minella
263e978a1f Updated for various code warnings
This commit addresses a number of deprications and other code warnings.
There are still many more to address, but this is a start.
2017-05-02 12:48:03 -05:00
Michael Minella
26b02fb836 Replaced snapshot versions and addressed deprications
This commit moves all SNAPSHOT dependencies to the latest available
released versions.  It also addresses a number of deprications in the
Spring Data realm.  Specifically around the deprication of the
Neo4JOperations and the package reorganization within Hibernate.
2016-12-30 14:04:58 -06:00
Philippe Marschall
dcc9da8273 BATCH-2407 Use StringBuilder instead of StringBuffer
With Java 1.5 StringBuilder is preferred over StringBuffer for single
threaded access as is has less overhead.

This is evidenced by the class comment of StringBuffer and Effective
Java 2nd Edition Item 67: Avoid excessive synchronization.

> The StringBuilder class should generally be used in preference to
> this one, as it supports all of the same operations but it is faster,
> as it performs no synchronization.

 - replace StringBuffer with StringBuilder where possible

Issue: BATCH-2407
2015-08-06 10:22:39 -05:00
Philippe Marschall
7092102748 BATCH-2411 Remove @SuppressWarnings("unchecked")
The source code contains various @SuppressWarnings("unchecked") that
are no longer unnecessary since the relevant APIs have been upgraded to
support Java 5 generics.

 - remove @SuppressWarnings("unchecked") where no longer unnecessary

Issue: BATCH-2411
2015-08-05 18:04:40 -05:00
Philippe Marschall
7ec7152c5e BATCH-2410 junit.framework.Assert is deprecated 2015-07-31 12:44:25 -05:00
Michael Minella
7c60b055c3 Removed dependency on ParameterizedRowMapper
To support Spring Framework 4.2 which removes ParameterizedRowMapper,
all references to that were switched to RowMapper.  As of Spring 3, the
interfaces are identicle so this should cause no backward compatability
issues.

BATCH-2369
2015-03-31 14:08:38 -05:00
Chris Schaefer
3eb7511322 Handle TestContext class to interface conversion from Spring 3 to Spring 4
Use reflection to make calls to the provided TestContext in StepScopeTestExecutionListener
Enables usage of Spring 4 w/ Batch 2.2 (in this case)
2014-05-22 11:19:36 -05:00
Michael Minella
39bb979a51 BATCH-2233: Moved JsrTestUtils to a location that is actually published with the release 2014-05-15 14:54:26 -05:00
Michael Minella
e7a4e348a5 BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs 2014-05-12 15:32:02 -05:00
jpraet
b26d272d43 cleanup 2014-04-02 14:35:53 -04:00
jpraet
2436d84210 BATCH-1701: Introduce job scope 2013-12-13 16:44:15 -06:00
Michael Minella
ce16ad2b03 BATCH-2007: Added a JobOperator implementation that complies with JSR-352.
* Added JsrJobOperator
* Added a ParametersConverter (and JSR-352 implementation) that converts parameters as specified by the JSR to JobParameters and back
* Added a method to the JobRepository to allow the direct creation of a JobInstance (since the JSR requires a new instance for each call to JobOperator#start
* Added a base context to be bootstrapped when the JobOperator is first referenced.  It provides things like a JobRepository, etc.
2013-08-04 11:49:48 -05:00
Michael Minella
557515df45 BATCH-1412: Implementing non-identifying job parameters 2013-02-05 17:39:12 +00:00
Chris Schaefer
a583c3a421 BATCH-1915: Change minimum compiler level to 1.6 and use @Override everywhere 2012-12-27 17:45:28 -05:00
Chris Schaefer
d0e0334674 BATCH-1891: Migrate usage of deprecated classes 2012-09-21 09:29:13 +01:00
David Thexton
00aab3eafa Add tests and implement fix for very quick running (<1ms) jobs (incorporating suggestions made) 2012-05-16 12:44:18 +01:00
Dave Syer
599891fd45 BATCH-1671: add public modifier 2010-12-21 10:34:11 +00:00
dsyer
a9cbc02e0b RESOLVED - issue BATCH-1642: test utility class to retrieve value from execution context 2010-10-28 15:49:20 +00:00
dsyer
fcb82be654 RESOLVED - issue BATCH-1642: test utility class to retrieve value from execution context 2010-10-28 15:47:52 +00:00
dsyer
cdc7feb184 BATCH-1601: remove static keyword 2010-08-29 07:16:05 +00:00
dsyer
59bd81740d BATCH-1598: re-order deletes in job repository test utils 2010-08-29 07:16:02 +00:00
dsyer
1807653ef3 BATCH-1534: changed AbstractJob to Job 2010-03-25 13:10:25 +00:00
dsyer
82947d6401 Fix ivy + OSGi meta-data 2010-01-19 08:57:18 +00:00
dsyer
5c8f527443 Fix some PMD violations where it made sense 2010-01-14 12:50:48 +00:00
dsyer
25b6f6b634 BATCH-1481: update for Spring 3. 2010-01-11 16:18:42 +00:00