Skip to content

Commit

Permalink
Enable JobExecutionDeserializationTests
Browse files Browse the repository at this point in the history
* Remove JobConfigurationName from test data.  Could not find where it was used in 2.11.x nor in main-3
* Change from old JobParameterType to java class name
  • Loading branch information
cppwfs committed Oct 8, 2024
1 parent fb52849 commit 06b7811
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Disabled;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.junit.jupiter.api.Test;

import org.springframework.batch.core.StepExecution;
Expand All @@ -38,14 +38,13 @@
* @author Glenn Renfro
* @author Corneil du Plessis
*/
// TODO revisit
@Disabled("Structure changes on Job 5.x")
class JobExecutionDeserializationTests {

@Test
void deserializationOfMultipleJobExecutions() throws IOException {

final ObjectMapper objectMapper = DataFlowTemplate.prepareObjectMapper(new ObjectMapper());
objectMapper.registerModule(new JavaTimeModule());

final InputStream inputStream = JobExecutionDeserializationTests.class
.getResourceAsStream("/JobExecutionJson.txt");
Expand All @@ -66,6 +65,8 @@ void deserializationOfMultipleJobExecutions() throws IOException {
void deserializationOfSingleJobExecution() throws IOException {

final ObjectMapper objectMapper = DataFlowTemplate.prepareObjectMapper(new ObjectMapper());
objectMapper.registerModule(new JavaTimeModule());


final InputStream inputStream = JobExecutionDeserializationTests.class
.getResourceAsStream("/SingleJobExecutionJson.txt");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 6,
"stopping": false,
Expand Down Expand Up @@ -117,7 +116,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 5,
"stopping": false,
Expand Down Expand Up @@ -186,7 +184,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 4,
"stopping": false,
Expand Down Expand Up @@ -225,42 +222,42 @@
"-spring.datasource.driverClassName": {
"identifying": false,
"value": "com.mysql.jdbc.Driver",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.password": {
"identifying": false,
"value": "password",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.cloud.task.name": {
"identifying": false,
"value": "foo",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.jmx.default-domain": {
"identifying": false,
"value": "foo.taskbatch",
"type": "STRING"
"type": "java.lang.String"
},
"-dataflow.group-deployment-id": {
"identifying": false,
"value": "foo-1458075239963",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.username": {
"identifying": false,
"value": "root",
"type": "STRING"
"type": "java.lang.String"
},
"-server.port": {
"identifying": false,
"value": "25553",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.url": {
"identifying": false,
"value": "jdbc:mysql:\/\/localhost:3306\/practice",
"type": "STRING"
"type": "java.lang.String"
}
},
"empty": false
Expand Down Expand Up @@ -294,7 +291,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 3,
"stopping": false,
Expand Down Expand Up @@ -370,7 +366,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 2,
"stopping": false,
Expand Down Expand Up @@ -409,42 +404,42 @@
"-spring.datasource.driverClassName": {
"identifying": false,
"value": "com.mysql.jdbc.Driver",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.password": {
"identifying": false,
"value": "password",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.cloud.task.name": {
"identifying": false,
"value": "foo",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.jmx.default-domain": {
"identifying": false,
"value": "foo.taskbatch",
"type": "STRING"
"type": "java.lang.String"
},
"-dataflow.group-deployment-id": {
"identifying": false,
"value": "foo-1458074090919",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.username": {
"identifying": false,
"value": "root",
"type": "STRING"
"type": "java.lang.String"
},
"-server.port": {
"identifying": false,
"value": "26244",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.url": {
"identifying": false,
"value": "jdbc:mysql:\/\/localhost:3306\/practice",
"type": "STRING"
"type": "java.lang.String"
}
},
"empty": false
Expand Down Expand Up @@ -478,7 +473,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 1,
"stopping": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,42 @@
"-spring.datasource.driverClassName": {
"identifying": false,
"value": "com.mysql.jdbc.Driver",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.password": {
"identifying": false,
"value": "password",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.cloud.task.name": {
"identifying": false,
"value": "foo",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.jmx.default-domain": {
"identifying": false,
"value": "foo.taskbatch",
"type": "STRING"
"type": "java.lang.String"
},
"-dataflow.group-deployment-id": {
"identifying": false,
"value": "foo-1458074090919",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.username": {
"identifying": false,
"value": "root",
"type": "STRING"
"type": "java.lang.String"
},
"-server.port": {
"identifying": false,
"value": "26244",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.url": {
"identifying": false,
"value": "jdbc:mysql:\/\/localhost:3306\/practice",
"type": "STRING"
"type": "java.lang.String"
}
},
"empty": false
Expand Down Expand Up @@ -106,42 +106,42 @@
"-spring.datasource.driverClassName": {
"identifying": false,
"value": "com.mysql.jdbc.Driver",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.password": {
"identifying": false,
"value": "password",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.cloud.task.name": {
"identifying": false,
"value": "foo",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.jmx.default-domain": {
"identifying": false,
"value": "foo.taskbatch",
"type": "STRING"
"type": "java.lang.String"
},
"-dataflow.group-deployment-id": {
"identifying": false,
"value": "foo-1458074090919",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.username": {
"identifying": false,
"value": "root",
"type": "STRING"
"type": "java.lang.String"
},
"-server.port": {
"identifying": false,
"value": "26244",
"type": "STRING"
"type": "java.lang.String"
},
"-spring.datasource.url": {
"identifying": false,
"value": "jdbc:mysql:\/\/localhost:3306\/practice",
"type": "STRING"
"type": "java.lang.String"
}
},
"empty": false
Expand Down Expand Up @@ -169,7 +169,6 @@
"failureExceptions": [

],
"jobConfigurationName": null,
"running": false,
"jobId": 1,
"stopping": false,
Expand Down

0 comments on commit 06b7811

Please sign in to comment.