Skip to content

Commit a3b55e4

Browse files
fix(spring-batch-examples): correct chunk size property name and update test expectations for invalid job ID
1 parent 8fb5394 commit a3b55e4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spring-batch-db-examples/src/test/java/com/io/example/controller/TestControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ void shouldReturnJobStatusForAllBatchStatuses(BatchStatus status) throws Excepti
5757
}
5858

5959
@Test
60-
@DisplayName("GET /job/{jobId}/status → should return 404 when job ID is invalid")
61-
void shouldReturn404WhenJobIdIsInvalid() throws Exception {
60+
@DisplayName("GET /job/{jobId}/status → should return 400 when job ID is invalid")
61+
void shouldReturn400WhenJobIdIsInvalid() throws Exception {
6262

6363
when(DBBatchService.getJobStatus(jobId))
6464
.thenThrow(new BusinessException("JobExecution not found for this id: " + jobId));

spring-batch-file-examples/src/main/resources/application-prd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ spring:
2222
initialize-schema: ${SPRING_BATCH_INITIALIZE_SCHEMA}
2323
job:
2424
enabled: ${SPRING_BATCH_JOB_ENABLED}
25-
SPRING_BATCH_CHUNK_SIZE: ${SPRING_BATCH_CHUNK_SIZE}
25+
chunk-size: ${SPRING_BATCH_CHUNK_SIZE}
2626
batch-size: ${SPRING_BATCH_BATCH_SIZE}

spring-batch-file-examples/src/test/java/com/io/example/controller/TestControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ void shouldReturnJobStatusForAllBatchStatuses(BatchStatus status) throws Excepti
6060
}
6161

6262
@Test
63-
@DisplayName("GET /job/{jobId}/status → should return 404 when job ID is invalid")
64-
void shouldReturn404WhenJobIdIsInvalid() throws Exception {
63+
@DisplayName("GET /job/{jobId}/status → should return 400 when job ID is invalid")
64+
void shouldReturn400WhenJobIdIsInvalid() throws Exception {
6565

6666
when(fileBatchService.getJobStatus(jobId))
6767
.thenThrow(new BusinessException("JobExecution not found for this id: " + jobId));

0 commit comments

Comments
 (0)