Skip to content

Commit ccdfba6

Browse files
committed
Updated to do some polishing after rebase and merge
1 parent dc115df commit ccdfba6

File tree

66 files changed

+93
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+93
-234
lines changed

.vscode/launch.json

Lines changed: 0 additions & 84 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

spring-batch-sample-apps/tasklet-sample-app/.vscode/launch.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

spring-batch-sample-apps/tasklet-sample-app/.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

spring-batch-samples/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@
162162
<groupId>org.junit.jupiter</groupId>
163163
<artifactId>junit-jupiter-engine</artifactId>
164164
<version>${junit-jupiter.version}</version>
165-
</dependency>
166-
<dependency>
167-
<groupId>org.junit.jupiter</groupId>
168-
<artifactId>junit-jupiter-api</artifactId>
169-
<version>${junit-jupiter.version}</version>
170165
<scope>test</scope>
171166
</dependency>
172167
<dependency>

spring-batch-samples/src/test/java/org/springframework/batch/sample/AMQPJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
@ExtendWith(SpringExtension.class)
4545
@ContextConfiguration(
4646
locations = { "/simple-job-launcher-context.xml", "/jobs/amqp-example-job.xml", "/job-runner-context.xml" })
47-
public class AMQPJobFunctionalTests {
47+
class AMQPJobFunctionalTests {
4848

4949
@Autowired
5050
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
@ExtendWith(SpringExtension.class)
4343
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/compositeItemWriterSampleJob.xml",
4444
"/job-runner-context.xml" })
45-
public class CompositeItemWriterSampleFunctionalTests {
45+
class CompositeItemWriterSampleFunctionalTests {
4646

4747
private static final String GET_TRADES = "SELECT isin, quantity, price, customer FROM TRADE order by isin";
4848

spring-batch-samples/src/test/java/org/springframework/batch/sample/CustomerFilterJobFunctionalTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@ExtendWith(SpringExtension.class)
4444
@ContextConfiguration(
4545
locations = { "/simple-job-launcher-context.xml", "/jobs/customerFilterJob.xml", "/job-runner-context.xml" })
46-
public class CustomerFilterJobFunctionalTests {
46+
class CustomerFilterJobFunctionalTests {
4747

4848
private static final String GET_CUSTOMERS = "select NAME, CREDIT from CUSTOMER order by NAME";
4949

@@ -64,8 +64,7 @@ public void setDataSource(DataSource dataSource) {
6464
}
6565

6666
@BeforeEach
67-
68-
public void onSetUp() throws Exception {
67+
void onSetUp() {
6968
JdbcTestUtils.deleteFromTables(jdbcTemplate, "TRADE");
7069
JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, "CUSTOMER", "ID > 4");
7170
jdbcTemplate.update("update CUSTOMER set credit=100000");
@@ -78,7 +77,7 @@ public void onSetUp() throws Exception {
7877
}
7978

8079
@AfterEach
81-
public void tearDown() throws Exception {
80+
void tearDown() {
8281
JdbcTestUtils.deleteFromTables(jdbcTemplate, "TRADE");
8382
JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, "CUSTOMER", "ID > 4");
8483
}

spring-batch-samples/src/test/java/org/springframework/batch/sample/DatabaseShutdownFunctionalTests.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,20 @@
1616

1717
package org.springframework.batch.sample;
1818

19-
import static org.junit.jupiter.api.Assertions.assertEquals;
20-
import static org.junit.jupiter.api.Assertions.assertFalse;
21-
import static org.junit.jupiter.api.Assertions.assertNotNull;
22-
import static org.junit.jupiter.api.Assertions.assertTrue;
23-
24-
import org.apache.commons.logging.Log;
25-
import org.apache.commons.logging.LogFactory;
26-
import org.junit.jupiter.api.Test;
2719
import org.apache.commons.logging.Log;
2820
import org.apache.commons.logging.LogFactory;
2921
import org.junit.jupiter.api.Test;
3022
import org.junit.jupiter.api.extension.ExtendWith;
31-
3223
import org.springframework.batch.core.BatchStatus;
3324
import org.springframework.batch.core.Job;
3425
import org.springframework.batch.core.JobExecution;
3526
import org.springframework.batch.core.launch.JobOperator;
3627
import org.springframework.batch.test.JobLauncherTestUtils;
3728
import org.springframework.beans.factory.annotation.Autowired;
38-
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
3929
import org.springframework.test.context.ContextConfiguration;
4030
import org.springframework.test.context.junit.jupiter.SpringExtension;
4131

42-
import static org.junit.jupiter.api.Assertions.assertEquals;
43-
import static org.junit.jupiter.api.Assertions.assertNotNull;
44-
import static org.junit.jupiter.api.Assertions.assertTrue;
45-
import static org.springframework.test.util.AssertionErrors.assertFalse;
32+
import static org.junit.jupiter.api.Assertions.*;
4633

4734
/**
4835
* Functional test for graceful shutdown. A batch container is started in a new thread,
@@ -57,7 +44,7 @@
5744
@ExtendWith(SpringExtension.class)
5845
@ContextConfiguration(
5946
locations = { "/simple-job-launcher-context.xml", "/jobs/infiniteLoopJob.xml", "/job-runner-context.xml" })
60-
public class DatabaseShutdownFunctionalTests {
47+
class DatabaseShutdownFunctionalTests {
6148

6249
/** Logger */
6350
protected final Log logger = LogFactory.getLog(getClass());

spring-batch-samples/src/test/java/org/springframework/batch/sample/DelegatingJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@ExtendWith(SpringExtension.class)
3232
@ContextConfiguration(
3333
locations = { "/simple-job-launcher-context.xml", "/jobs/delegatingJob.xml", "/job-runner-context.xml" })
34-
public class DelegatingJobFunctionalTests {
34+
class DelegatingJobFunctionalTests {
3535

3636
@Autowired
3737
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/FootballJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@ExtendWith(SpringExtension.class)
3333
@ContextConfiguration(
3434
locations = { "/simple-job-launcher-context.xml", "/jobs/footballJob.xml", "/job-runner-context.xml" })
35-
public class FootballJobFunctionalTests {
35+
class FootballJobFunctionalTests {
3636

3737
@Autowired
3838
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/GracefulShutdownFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@ExtendWith(SpringExtension.class)
4242
@ContextConfiguration(
4343
locations = { "/simple-job-launcher-context.xml", "/jobs/infiniteLoopJob.xml", "/job-runner-context.xml" })
44-
public class GracefulShutdownFunctionalTests {
44+
class GracefulShutdownFunctionalTests {
4545

4646
/** Logger */
4747
private final Log logger = LogFactory.getLog(getClass());

spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class GroovyJobFunctionalTests {
4141
private JobLauncherTestUtils jobLauncherTestUtils;
4242

4343
@BeforeEach
44-
public void removeOldData() throws IOException {
44+
void removeOldData() throws IOException {
4545
FileUtils.deleteDirectory(new File("target/groovyJob"));
4646
}
4747

spring-batch-samples/src/test/java/org/springframework/batch/sample/HeaderFooterSampleFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@ExtendWith(SpringExtension.class)
3535
@ContextConfiguration(
3636
locations = { "/simple-job-launcher-context.xml", "/jobs/headerFooterSample.xml", "/job-runner-context.xml" })
37-
public class HeaderFooterSampleFunctionalTests {
37+
class HeaderFooterSampleFunctionalTests {
3838

3939
@Autowired
4040
@Qualifier("inputResource")

spring-batch-samples/src/test/java/org/springframework/batch/sample/JobOperatorFunctionalTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
@ExtendWith(SpringExtension.class)
4141
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/infiniteLoopJob.xml" })
42-
public class JobOperatorFunctionalTests {
42+
class JobOperatorFunctionalTests {
4343

4444
private static final Log LOG = LogFactory.getLog(JobOperatorFunctionalTests.class);
4545

@@ -53,7 +53,7 @@ public class JobOperatorFunctionalTests {
5353
private JobRegistry jobRegistry;
5454

5555
@BeforeEach
56-
public void setUp() throws Exception {
56+
void setUp() throws Exception {
5757
if (!jobRegistry.getJobNames().contains(job.getName())) {
5858
jobRegistry.register(new ReferenceJobFactory(job));
5959
}

spring-batch-samples/src/test/java/org/springframework/batch/sample/JobStepFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
@ExtendWith(SpringExtension.class)
4343
@ContextConfiguration
44-
public class JobStepFunctionalTests {
44+
class JobStepFunctionalTests {
4545

4646
@Autowired
4747
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/LoopFlowSampleFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@ExtendWith(SpringExtension.class)
3838
@ContextConfiguration(
3939
locations = { "/simple-job-launcher-context.xml", "/jobs/loopFlowSample.xml", "/job-runner-context.xml" })
40-
public class LoopFlowSampleFunctionalTests {
40+
class LoopFlowSampleFunctionalTests {
4141

4242
@Autowired
4343
private ItemTrackingTradeItemWriter itemWriter;

spring-batch-samples/src/test/java/org/springframework/batch/sample/MailJobFunctionalTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@ExtendWith(SpringExtension.class)
5050
@ContextConfiguration(
5151
locations = { "/simple-job-launcher-context.xml", "/jobs/mailJob.xml", "/job-runner-context.xml" })
52-
public class MailJobFunctionalTests {
52+
class MailJobFunctionalTests {
5353

5454
private static final String email = "[email protected]";
5555

@@ -86,14 +86,14 @@ public void setDataSource(DataSource dataSource) {
8686
}
8787

8888
@BeforeEach
89-
public void before() {
89+
void before() {
9090
mailSender.clear();
9191
errorHandler.clear();
9292
jdbcTemplate.update("create table USERS (ID INTEGER, NAME VARCHAR(40), EMAIL VARCHAR(20))");
9393
}
9494

9595
@AfterEach
96-
public void after() throws Exception {
96+
void after() throws Exception {
9797
JdbcTestUtils.dropTables(jdbcTemplate, "USERS");
9898
}
9999

spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@ExtendWith(SpringExtension.class)
3434
@ContextConfiguration(
3535
locations = { "/simple-job-launcher-context.xml", "/jobs/multilineJob.xml", "/job-runner-context.xml" })
36-
public class MultilineJobFunctionalTests {
36+
class MultilineJobFunctionalTests {
3737

3838
@Autowired
3939
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@ExtendWith(SpringExtension.class)
3232
@ContextConfiguration(
3333
locations = { "/simple-job-launcher-context.xml", "/jobs/multilineOrderJob.xml", "/job-runner-context.xml" })
34-
public class MultilineOrderJobFunctionalTests {
34+
class MultilineOrderJobFunctionalTests {
3535

3636
private static final String ACTUAL = "target/test-outputs/multilineOrderOutput.txt";
3737

spring-batch-samples/src/test/java/org/springframework/batch/sample/ParallelJobFunctionalTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@ExtendWith(SpringExtension.class)
3636
@ContextConfiguration(
3737
locations = { "/simple-job-launcher-context.xml", "/jobs/parallelJob.xml", "/job-runner-context.xml" })
38-
public class ParallelJobFunctionalTests {
38+
class ParallelJobFunctionalTests {
3939

4040
@Autowired
4141
private JobLauncherTestUtils jobLauncherTestUtils;

spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@
4242

4343
import static org.junit.jupiter.api.Assertions.assertEquals;
4444
import static org.junit.jupiter.api.Assertions.assertTrue;
45-
import static org.springframework.test.util.AssertionErrors.assertTrue;
4645

4746
@ExtendWith(SpringExtension.class)
4847
@ContextConfiguration(
4948
locations = { "/simple-job-launcher-context.xml", "/jobs/partitionFileJob.xml", "/job-runner-context.xml" })
50-
public class PartitionFileJobFunctionalTests implements ApplicationContextAware {
49+
class PartitionFileJobFunctionalTests implements ApplicationContextAware {
5150

5251
@Autowired
5352
@Qualifier("inputTestReader")
@@ -88,7 +87,7 @@ void testUpdateCredit(@Autowired Job job) throws Exception {
8887

8988
assertEquals(inputs.size(), outputs.size());
9089
int itemCount = inputs.size();
91-
assertTrue("No entries were available in the input", itemCount > 0);
90+
assertTrue(itemCount > 0, "No entries were available in the input");
9291

9392
inputs.iterator();
9493
for (int i = 0; i < itemCount; i++) {

0 commit comments

Comments
 (0)