Set Spring Cloud Task Date Strategy to match Batch

resolves #868
Signed-off-by: Glenn Renfro <grenfro@vmware.com>

Updated the timestamps for H2,oracle, db2, hsqldb to be 9 digits for improved accuracy
This commit is contained in:
Glenn Renfro
2022-10-18 08:17:38 -04:00
parent cf8056880b
commit a0fda4bf6e
30 changed files with 243 additions and 247 deletions

View File

@@ -19,7 +19,6 @@ package org.springframework.cloud.task.batch.handler;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -156,8 +155,6 @@ public class TaskJobLauncherApplicationRunner extends JobLauncherApplicationRunn
private void monitorJobExecutions() {
RepeatTemplate template = new RepeatTemplate();
Date startDate = new Date();
template.iterate(context -> {
List<JobExecution> failedJobExecutions = new ArrayList<>();

View File

@@ -16,6 +16,7 @@
package org.springframework.cloud.task.batch.partition;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -91,7 +92,7 @@ public class DeployerPartitionHandlerTests {
public void setUp() {
MockitoAnnotations.openMocks(this);
this.environment = new MockEnvironment();
TaskExecution taskExecution = new TaskExecution(2, 0, "name", new Date(), new Date(), "",
TaskExecution taskExecution = new TaskExecution(2, 0, "name", LocalDateTime.now(), LocalDateTime.now(), "",
Collections.emptyList(), null, null, null);
Mockito.lenient().when(taskRepository.createTaskExecution()).thenReturn(taskExecution);
}