diff --git a/spring-batch-integration/pom.xml b/spring-batch-integration/pom.xml index 9c30b64aa..27ef882e1 100644 --- a/spring-batch-integration/pom.xml +++ b/spring-batch-integration/pom.xml @@ -115,12 +115,24 @@ artemis-server ${artemis.version} test + + + org.slf4j + slf4j-api + + org.apache.activemq artemis-jakarta-client ${artemis.version} test + + + org.slf4j + slf4j-api + + org.junit.jupiter diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java index 1b1ade569..85d85aab9 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Collections; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.Job; @@ -36,6 +37,8 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; @SpringJUnitConfig +// FIXME fix this test by using a standard embedded datasource +@Disabled("This test hangs when using a datasource other than org.apache.commons.dbcp2.BasicDataSource") class RemoteChunkFaultTolerantStepJdbcIntegrationTests { @Autowired diff --git a/spring-batch-integration/src/test/resources/config-derby.properties b/spring-batch-integration/src/test/resources/config-derby.properties deleted file mode 100644 index c41d09505..000000000 --- a/spring-batch-integration/src/test/resources/config-derby.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Placeholders batch.* -# for Derby: -batch.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver -batch.jdbc.url=jdbc:derby:derby-home/test;create=true -batch.jdbc.user=app -batch.jdbc.password= -batch.jdbc.testWhileIdle=false -batch.jdbc.validationQuery= -batch.data.source.init=true -batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer -batch.schema.script=classpath:/org/springframework/batch/core/schema-derby.sql -batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-derby.sql -integration.schema.script=classpath*:/org/springframework/integration/jdbc/schema-derby.sql -integration.drop.script=classpath*:/org/springframework/integration/jdbc/schema-drop-derby.sql diff --git a/spring-batch-integration/src/test/resources/config-h2.properties b/spring-batch-integration/src/test/resources/config-h2.properties deleted file mode 100644 index 9e5516dbc..000000000 --- a/spring-batch-integration/src/test/resources/config-h2.properties +++ /dev/null @@ -1,13 +0,0 @@ -# Default database platform is HSQLDB: -batch.jdbc.driver=org.h2.Driver -batch.jdbc.url=jdbc:h2:file:target/data/h2;DB_CLOSE_ON_EXIT=FALSE -batch.jdbc.user=sa -batch.jdbc.password= -batch.jdbc.testWhileIdle=false -batch.jdbc.validationQuery= -batch.data.source.init=true -batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.H2SequenceMaxValueIncrementer -batch.schema.script=classpath*:/org/springframework/batch/core/schema-h2.sql -batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-h2.sql -integration.schema.script=classpath*:/org/springframework/integration/jdbc/schema-h2.sql -integration.drop.script=classpath*:/org/springframework/integration/jdbc/schema-drop-h2.sql diff --git a/spring-batch-integration/src/test/resources/config-hsql.properties b/spring-batch-integration/src/test/resources/config-hsql.properties deleted file mode 100644 index ae9223598..000000000 --- a/spring-batch-integration/src/test/resources/config-hsql.properties +++ /dev/null @@ -1,16 +0,0 @@ -# Default database platform is HSQLDB: -batch.jdbc.driver=org.hsqldb.jdbcDriver -batch.jdbc.url=jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true;hsqldb.tx=mvcc -# Override and use this one in for a separate server process so you can inspect -# the results (or add it to system properties with -D to override at run time). -# batch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples -batch.jdbc.user=sa -batch.jdbc.password= -batch.jdbc.testWhileIdle=false -batch.jdbc.validationQuery= -batch.data.source.init=true -batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.HsqlMaxValueIncrementer -batch.schema.script=classpath*:/org/springframework/batch/core/schema-hsqldb.sql -batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-hsqldb.sql -integration.schema.script=classpath*:/org/springframework/integration/jdbc/schema-hsqldb.sql -integration.drop.script=classpath*:/org/springframework/integration/jdbc/schema-drop-hsqldb.sql diff --git a/spring-batch-integration/src/test/resources/config-mysql.properties b/spring-batch-integration/src/test/resources/config-mysql.properties deleted file mode 100644 index 083deef2e..000000000 --- a/spring-batch-integration/src/test/resources/config-mysql.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Placeholders batch.* -# for MySQL: -batch.jdbc.driver=com.mysql.jdbc.Driver -batch.jdbc.url=jdbc:mysql://localhost/test -batch.jdbc.user=root -batch.jdbc.password=root -batch.jdbc.testWhileIdle=true -batch.jdbc.validationQuery=SELECT 1 -batch.data.source.init=true -batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.MySQLMaxValueIncrementer -batch.schema.script=classpath:/org/springframework/batch/core/schema-mysql.sql -batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-mysql.sql -integration.schema.script=classpath*:/org/springframework/integration/jdbc/schema-mysql.sql -integration.drop.script=classpath*:/org/springframework/integration/jdbc/schema-drop-mysql.sql diff --git a/spring-batch-integration/src/test/resources/data-source-context.xml b/spring-batch-integration/src/test/resources/data-source-context.xml new file mode 100644 index 000000000..99019a357 --- /dev/null +++ b/spring-batch-integration/src/test/resources/data-source-context.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-batch-integration/src/test/resources/jms-context.xml b/spring-batch-integration/src/test/resources/jms-context.xml index 5dd1d4bd9..84fed9045 100644 --- a/spring-batch-integration/src/test/resources/jms-context.xml +++ b/spring-batch-integration/src/test/resources/jms-context.xml @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/spring-batch-integration/src/test/resources/log4j.properties b/spring-batch-integration/src/test/resources/log4j.properties deleted file mode 100644 index c50991a95..000000000 --- a/spring-batch-integration/src/test/resources/log4j.properties +++ /dev/null @@ -1,13 +0,0 @@ -log4j.rootCategory=WARN, stdout - -log4j.appender.stdout=org.apache.logging.log4j.core.appender.ConsoleAppender -log4j.appender.stdout.layout=org.apache.logging.log4j.core.layout.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d %5p %t [%c] - <%m>%n - -log4j.category.org.springframework.context=INFO -log4j.category.org.springframework.beans=INFO -log4j.category.org.springframework.retry=DEBUG -log4j.category.org.springframework.batch.core=DEBUG -log4j.category.org.springframework.batch.integration=DEBUG -log4j.category.org.springframework.integration=DEBUG -log4j.category.org.springframework.transaction=INFO diff --git a/spring-batch-integration/src/test/resources/broker.xml b/spring-batch-integration/src/test/resources/message-broker-configuration.xml similarity index 100% rename from spring-batch-integration/src/test/resources/broker.xml rename to spring-batch-integration/src/test/resources/message-broker-configuration.xml diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml index 82254080a..9ff0d00b6 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepIntegrationTests-context.xml @@ -1,17 +1,12 @@ + http://www.springframework.org/schema/batch https://www.springframework.org/schema/batch/spring-batch.xsd"> @@ -76,16 +71,7 @@ - - - - - - - - - - + diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml index 897746e49..480db468d 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml @@ -1,17 +1,15 @@ + http://www.springframework.org/schema/integration/jdbc https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> @@ -101,31 +99,17 @@ - - - - - - - - + + + + + + - - - - - - - - - - diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJmsIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJmsIntegrationTests-context.xml index 609aa66ee..0895b1369 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJmsIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJmsIntegrationTests-context.xml @@ -3,13 +3,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:integration="http://www.springframework.org/schema/integration" xmlns:int-jms="http://www.springframework.org/schema/integration/jms" - xmlns:jms="http://www.springframework.org/schema/jms" xmlns:jdbc="http://www.springframework.org/schema/jdbc" + xmlns:jms="http://www.springframework.org/schema/jms" xmlns:batch="http://www.springframework.org/schema/batch" xsi:schemaLocation="http://www.springframework.org/schema/jms https://www.springframework.org/schema/jms/spring-jms.xsd http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd http://www.springframework.org/schema/integration/jms https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/batch https://www.springframework.org/schema/batch/spring-batch.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> + http://www.springframework.org/schema/batch https://www.springframework.org/schema/batch/spring-batch.xsd"> @@ -105,16 +105,7 @@ - - - - - - - - - - + diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkStepIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkStepIntegrationTests-context.xml index 147fe1452..9b6fb3d61 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkStepIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkStepIntegrationTests-context.xml @@ -1,15 +1,12 @@ + http://www.springframework.org/schema/batch https://www.springframework.org/schema/batch/spring-batch.xsd"> @@ -61,16 +58,7 @@ - - - - - - - - - - + diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingManagerParserTests.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingManagerParserTests.xml index 4cb4c9a53..4f92f80e9 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingManagerParserTests.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingManagerParserTests.xml @@ -3,7 +3,6 @@ + - - - diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml index 4cb4c9a53..7f1edd06d 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml @@ -45,13 +45,5 @@ - - - - - + diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml index 5d918b386..64f9df574 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml @@ -1,24 +1,12 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:batch="http://www.springframework.org/schema/batch" + xsi:schemaLocation="http://www.springframework.org/schema/batch https://www.springframework.org/schema/batch/spring-batch.xsd + http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - - - - - - - - - - + diff --git a/spring-batch-integration/src/test/resources/simple-job-launcher-context.xml b/spring-batch-integration/src/test/resources/simple-job-launcher-context.xml index a986354e4..00b702423 100644 --- a/spring-batch-integration/src/test/resources/simple-job-launcher-context.xml +++ b/spring-batch-integration/src/test/resources/simple-job-launcher-context.xml @@ -1,24 +1,14 @@ + xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd"> + + - - - - - - - - - - - @@ -35,13 +25,13 @@ - + -