From df14546a7fce5cb58761965e0c4b1347c27ff60a Mon Sep 17 00:00:00 2001 From: Glenn Renfro Date: Tue, 10 May 2016 10:08:49 -0400 Subject: [PATCH] SCT-139 Exception info and error codes will be recorded for the task resolves spring-cloud/spring-cloud-task#139 --- .../DeployerPartitionHandlerTests.java | 2 +- .../task/listener/TaskLifecycleListener.java | 1 + .../cloud/task/TaskCoreTests.java | 119 ++++++++++++++++++ .../listener/TaskExecutionListenerTests.java | 4 +- .../listener/TaskLifecycleListenerTests.java | 2 +- .../src/test/resources/application.properties | 1 + 6 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 spring-cloud-task-core/src/test/java/org/springframework/cloud/task/TaskCoreTests.java create mode 100644 spring-cloud-task-core/src/test/resources/application.properties diff --git a/spring-cloud-task-batch/src/test/java/org/springframework/cloud/task/batch/partition/DeployerPartitionHandlerTests.java b/spring-cloud-task-batch/src/test/java/org/springframework/cloud/task/batch/partition/DeployerPartitionHandlerTests.java index 05f711d8..4dc34b17 100644 --- a/spring-cloud-task-batch/src/test/java/org/springframework/cloud/task/batch/partition/DeployerPartitionHandlerTests.java +++ b/spring-cloud-task-batch/src/test/java/org/springframework/cloud/task/batch/partition/DeployerPartitionHandlerTests.java @@ -460,7 +460,7 @@ public class DeployerPartitionHandlerTests { validateStepExecutionResults(results); assertTrue("Time difference was too small: " + (endTime.getTime() - startTime.getTime()), - endTime.getTime() - startTime.getTime() >= 20000); + endTime.getTime() - startTime.getTime() >= 19999); } @Test(expected = TimeoutException.class) diff --git a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java index 8577223f..2051e038 100644 --- a/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java +++ b/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/TaskLifecycleListener.java @@ -118,6 +118,7 @@ public class TaskLifecycleListener implements ApplicationListener