Commit Graph

1926 Commits

Author SHA1 Message Date
Parikshit Dutta
fecf8a5c44 Add default methods in listener interfaces
Resolves #3924
2021-09-10 09:34:25 +02:00
Mahmoud Ben Hassine
dacf5bca3d Remove unused variable in FaultTolerantChunkProcessor
This commit removes the count variable which is
incremented but never queried.
2021-09-09 21:29:14 +02:00
Mahmoud Ben Hassine
7067dcb1bc Remove unused private method in SimpleFlow 2021-09-09 21:22:45 +02:00
Mahmoud Ben Hassine
03918b2929 Refactor DefaultJobKeyGenerator to use org.springframework.util.DigestUtils 2021-09-09 21:10:00 +02:00
Mahmoud Ben Hassine
497438a318 Add assertions to reject null values in JobParameter
Resolves #3913
2021-09-09 17:00:05 +02:00
Philippe Marschall
c9d827ca11 Avoid string conversion in ExecutionContextSerializer tests
Avoid the byte to string to byte conversion in
AbstractExecutionContextSerializerTests.
2021-09-03 21:34:09 +02:00
Henning Pöttker
fce9a48080 Make ScopeConfiguration publicly accessible
When using a hierarchy of Spring contexts, custom scopes
are not visible in child contexts. With this change, it is
now possible for users to import the configuration class
into child contexts and use job and step scope within them.

Issue #3958
2021-09-03 21:09:29 +02:00
Rémi Kaeffer
a6d68138ff Fix double "the" typo everywhere in source code 2021-09-03 19:07:19 +02:00
Parikshit Dutta
637226064c Change default value of DATE_VAL to null for non-date type job parameters
Resolves #1577
2021-09-03 16:03:26 +02:00
tinh cao
324a769aa0 Remove whitespace to support multiple execution statement
Issue #3861
2021-09-03 11:30:15 +02:00
Mahmoud Ben Hassine
d0ab497312 Fix step execution retrieval in SimpleJobExplorer#getLastJobExecution
Before this commit, SimpleJobExplorer#getLastJobExecution returned
the last job execution without fetching its step executions and
their execution contexts.

This commit fixes the implementation to load the entire object
graph as done in SimpleJobExplorer#getJobExecution.

Resolves #3943 #3944
2021-08-27 14:00:41 +02:00
Mahmoud Ben Hassine
de9ce2d0cc Use JdbcTestUtils where appropriate in tests 2021-08-26 22:12:34 +02:00
Taeik Lim
26fc468eb2 Use getDataSource method in DefaultBatchConfigurer 2021-08-25 14:16:22 +02:00
Mahmoud Ben Hassine
d206de1cd0 Clean up schema versions in XML files of tests/samples
The schema version in JobParserWrongSchemaInRootTests-context.xml
has not been removed as it is used on purpose for
JobParserExceptionTests#testWrongSchemaInRoot.

Resolves #913
2021-08-24 11:51:37 +02:00
Mahmoud Ben Hassine
4b3bcac082 Update datasource configuration in samples/tests 2021-08-17 22:52:45 +02:00
Mahmoud Ben Hassine
36b63ed283 Remove usage of master/slave terminology 2021-08-17 21:59:30 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Mahmoud Ben Hassine
f8bdf5521e Remove the Map based job repository/explorer and their DAOs
This commit removes the deprecated Map-based job repository
and job explorer implementations with their respective DAOs.
Using the `EnableBatchProcessing` annotation now requires a
datasource bean to be defined in the application context.
This will be reviewed as part of #3942.

This commit is a first pass that updates related tests to use
the JDBC-based job repository/explorer with an embedded database.
A second pass should be done to improve tests by caching/reusing
embedded databases if possible.

Issue #3836
2021-08-17 16:23:46 +02:00
Mahmoud Ben Hassine
d5509d2444 Remove SQLFire support
Resolves #3839
2021-08-14 08:53:16 +02:00
Mahmoud Ben Hassine
27e11b52f9 Remove usage of deprecated APIs
Resolves #3838
2021-08-12 15:51:02 +02:00
Gregor Riegler
7a3d26c9f7 simplify boolean expression
Co-authored-by: Moderne <team@moderne.io>
2021-08-11 20:50:34 +02:00
Mahmoud Ben Hassine
31899d5fc3 Remove usage of deprecated APIs
Issue #3838
2021-08-11 20:23:12 +02:00
Henning Pöttker
64c09c523e Replaces deprecated interfaces
Replaces the deprecated
- type InstantiationAwareBeanPostProcessorAdapter
- type GenericTypeResolver
- method StringUtils::isEmpty
- field BigDecimal::ROUND_HALF_UP

Issue #3838
2021-08-11 15:20:18 +02:00
Mahmoud Ben Hassine
7bbbd4f667 Refine contribution #3962
- Fix failing tests
- Update year in license headers

Related to #3838
2021-08-10 17:50:41 +02:00
Sebastiano Valle
24422b5163 Remove some deprecated APIs from tests
The following deprecated APIs are not in use anymore in the project's tests:
- `org.junit.rules.ExpectedException#none`
- `org.mockito.MockitoAnnotations#initMocks`
- `org.mockito.Mockito#verifyZeroInteractions`

Issue #3838
2021-08-10 17:48:21 +02:00
Henning Pöttker
7242f8fe77 Replace deprecated TransactionSynchronizationAdapter
Issue #3838
2021-08-10 15:28:02 +02:00
Philippe Marschall
3d0cb90590 Remove double brace initialization
Remove double brace collection initialization as
it is considered bad practice.
2021-08-10 12:56:58 +02:00
Philippe Marschall
f15edd414a Fix some raw types 2021-08-10 12:41:19 +02:00
Philippe Marschall
c9e06b2a7f Don't call wrapper constructors directly
The constructors of the wrapper classes for primitives (Double,
Integer, Long) have been deprecated since JDK 9 and should no longer be
called. Instead the static factory #valueOf should be used.
2021-08-10 11:54:25 +02:00
Philippe Marschall
1f3dd5f401 Replace Assert.assertThat with MatcherAssert.assertThat
Assert.assertThat is deprecated with MatcherAssert.assertThat as the
replacement.
2021-08-09 21:04:52 +02:00
Philippe Marschall
2aa94d09d1 Replace #initMocks with MockitoRule
Replace all references of MockitoAnnotations#initMocks with the
MockitoRule JUnit rule.
2021-08-09 18:33:39 +02:00
Henning Poettker
0ad68037b6 Reduce naming collisions in consecutive tests 2021-08-09 13:36:31 +02:00
Mahmoud Ben Hassine
83579cfbdf Extract charset name as constant in JdbcExecutionContextDao 2021-08-05 22:14:05 +02:00
Mahmoud Ben Hassine
a031637994 Add integration tests for all supported databases
Resolves #3092
2021-07-06 14:45:14 +02:00
Taeik Lim
4af4b05e33 Fix NPE in JobParameters.toProperties on null parameter value
Issue #834
2021-05-18 15:55:04 +02:00
Mark Bonnekessel
a43d3a5ab7 Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder
to prevent creation of a new FaultTolerantStepBuilder when calling
faultTolerant() on an existing FaultTolerantStepBuilder. Otherwise
configuration, like chunkListeners, are lost.

Issue #3840
2021-05-11 19:09:49 +02:00
Parikshit Dutta
58e82a56e7 Update SimpleStepBuilder to assign ItemProcessor lambda at construction
Issue #3749
2021-05-11 16:14:29 +02:00
Mahmoud Ben Hassine
7f0824b9da Fix job execution validation in SimpleJobRepository
Before this commit, the logic that validates if a job
instance is complete or not was based only on the size
of previous parameters, without checking if they are
identifying or not.

This commit introduces a change that uses only
identifying job parameters to identify a job instance
and validate its previous executions.

Issue #1221
2021-05-05 16:20:28 +02:00
Mahmoud Ben Hassine
c4b001b732 Remove usage of deprecated APIs from testcontainers 2021-05-04 12:21:58 +02:00
Mahmoud Ben Hassine
b8a6a51488 Rename MySQLJdbcJobRepositoryTests to MySQLJdbcJobRepositoryIntegrationTests
Since this is a Docker based test, it should be part
of the integration test suite executed by
maven-failsafe-plugin during the `verify` phase.
2021-05-04 12:04:19 +02:00
Mahmoud Ben Hassine
5fbbad9888 Disable SSL usage in MySQL test container
By default, testcontainers does not use SSL. This commit
disable SSL usage in the datasource configuration to
prevent `SSLHandshakeException`s.
2021-05-04 11:21:33 +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
siqqQ
a6f283b4a8 Change the value of the kind attribute to ref
Issue #1479
2021-03-02 17:39:07 +01:00
Mahmoud Ben Hassine
1d23d66e27 Add java.sql.Timestamp to trusted classes in Jackson serializer
Resolves #3855
2021-03-01 13:39:35 +01:00
Mahmoud Ben Hassine
602656a241 Polish contribution 58b2a7a2
* Update year in license headers
* Refactor test
2021-03-01 11:25:42 +01:00
Jagger
58b2a7a26b Add Arrays$ArrayList to trusted classes in Jackson serializer
Issue #3830
2021-03-01 11:24:19 +01:00
s.h.bae
f51ed50141 Fix javadoc on ItemReadListener interface
Found after reading some javadocs.
This seems to be a copy & paste mistake.
2021-02-19 13:56:42 +01:00
fhassak
4e02ce7daa Fix javadoc in ExitStatus 2021-02-19 10:21:58 +01:00
Mahmoud Ben Hassine
fc113be4a7 Temporarily ignore intermittently failing tests
This commit temporarily ignores tests that are failing
intermittently on Windows. A link to the corresponding
issue has been added to each test.

FTR, I tried to ignore those tests only on Windows by
using `Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS);`
where `SystemUtils` is from `org.apache.commons.lang3`
but this assumption does not seem to work as expected.
2021-02-18 18:09:40 +01:00
Mahmoud Ben Hassine
d0493906a8 Replace usage of "build" directory with "target" 2021-01-29 11:45:34 +01:00