diff --git a/spring-cloud-dataflow-rest-client/src/test/java/org/springframework/cloud/dataflow/rest/client/JobExecutionDeserializationTests.java b/spring-cloud-dataflow-rest-client/src/test/java/org/springframework/cloud/dataflow/rest/client/JobExecutionDeserializationTests.java index 8bcad5c993..cb73bd635b 100644 --- a/spring-cloud-dataflow-rest-client/src/test/java/org/springframework/cloud/dataflow/rest/client/JobExecutionDeserializationTests.java +++ b/spring-cloud-dataflow-rest-client/src/test/java/org/springframework/cloud/dataflow/rest/client/JobExecutionDeserializationTests.java @@ -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; @@ -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"); @@ -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"); diff --git a/spring-cloud-dataflow-rest-client/src/test/resources/JobExecutionJson.txt b/spring-cloud-dataflow-rest-client/src/test/resources/JobExecutionJson.txt index 747f110650..a24778d761 100644 --- a/spring-cloud-dataflow-rest-client/src/test/resources/JobExecutionJson.txt +++ b/spring-cloud-dataflow-rest-client/src/test/resources/JobExecutionJson.txt @@ -48,7 +48,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 6, "stopping": false, @@ -117,7 +116,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 5, "stopping": false, @@ -186,7 +184,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 4, "stopping": false, @@ -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 @@ -294,7 +291,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 3, "stopping": false, @@ -370,7 +366,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 2, "stopping": false, @@ -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 @@ -478,7 +473,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 1, "stopping": false, diff --git a/spring-cloud-dataflow-rest-client/src/test/resources/SingleJobExecutionJson.txt b/spring-cloud-dataflow-rest-client/src/test/resources/SingleJobExecutionJson.txt index d12baab93a..8217b578a5 100644 --- a/spring-cloud-dataflow-rest-client/src/test/resources/SingleJobExecutionJson.txt +++ b/spring-cloud-dataflow-rest-client/src/test/resources/SingleJobExecutionJson.txt @@ -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 @@ -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 @@ -169,7 +169,6 @@ "failureExceptions": [ ], - "jobConfigurationName": null, "running": false, "jobId": 1, "stopping": false,