diff --git a/mysql-persistence/src/main/java/com/netflix/conductor/mysql/dao/MySQLExecutionDAO.java b/mysql-persistence/src/main/java/com/netflix/conductor/mysql/dao/MySQLExecutionDAO.java index fb07329854..9c50ad7d64 100644 --- a/mysql-persistence/src/main/java/com/netflix/conductor/mysql/dao/MySQLExecutionDAO.java +++ b/mysql-persistence/src/main/java/com/netflix/conductor/mysql/dao/MySQLExecutionDAO.java @@ -333,9 +333,7 @@ public WorkflowModel getWorkflow(String workflowId, boolean includeTasks) { if (workflow != null) { if (includeTasks) { List tasks = getTasksForWorkflow(workflowId); - tasks.sort( - Comparator.comparingLong(TaskModel::getScheduledTime) - .thenComparingInt(TaskModel::getSeq)); + tasks.sort(Comparator.comparingInt(TaskModel::getSeq)); workflow.setTasks(tasks); } } diff --git a/postgres-persistence/src/main/java/com/netflix/conductor/postgres/dao/PostgresExecutionDAO.java b/postgres-persistence/src/main/java/com/netflix/conductor/postgres/dao/PostgresExecutionDAO.java index ed42620ac9..510563d363 100644 --- a/postgres-persistence/src/main/java/com/netflix/conductor/postgres/dao/PostgresExecutionDAO.java +++ b/postgres-persistence/src/main/java/com/netflix/conductor/postgres/dao/PostgresExecutionDAO.java @@ -335,9 +335,7 @@ public WorkflowModel getWorkflow(String workflowId, boolean includeTasks) { if (workflow != null) { if (includeTasks) { List tasks = getTasksForWorkflow(workflowId); - tasks.sort( - Comparator.comparingLong(TaskModel::getScheduledTime) - .thenComparingInt(TaskModel::getSeq)); + tasks.sort(Comparator.comparingInt(TaskModel::getSeq)); workflow.setTasks(tasks); } } diff --git a/redis-persistence/src/main/java/com/netflix/conductor/redis/dao/RedisExecutionDAO.java b/redis-persistence/src/main/java/com/netflix/conductor/redis/dao/RedisExecutionDAO.java index f41d413569..e653d3d6f5 100644 --- a/redis-persistence/src/main/java/com/netflix/conductor/redis/dao/RedisExecutionDAO.java +++ b/redis-persistence/src/main/java/com/netflix/conductor/redis/dao/RedisExecutionDAO.java @@ -499,9 +499,7 @@ public WorkflowModel getWorkflow(String workflowId, boolean includeTasks) { "getWorkflow", json.length(), "n/a", workflow.getWorkflowName()); if (includeTasks) { List tasks = getTasksForWorkflow(workflowId); - tasks.sort( - Comparator.comparingLong(TaskModel::getScheduledTime) - .thenComparingInt(TaskModel::getSeq)); + tasks.sort(Comparator.comparingInt(TaskModel::getSeq)); workflow.setTasks(tasks); } } diff --git a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/WorkflowAndTaskConfigurationSpec.groovy b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/WorkflowAndTaskConfigurationSpec.groovy index 408c884e49..d0dd8be3ec 100644 --- a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/WorkflowAndTaskConfigurationSpec.groovy +++ b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/WorkflowAndTaskConfigurationSpec.groovy @@ -714,7 +714,7 @@ class WorkflowAndTaskConfigurationSpec extends AbstractSpecification { } def "Test wait time out task based simple workflow"() { - when: "Start a workflow based on a task that has a registered wiat time out" + when: "Start a workflow based on a task that has a registered wait time out" def workflowInstanceId = workflowExecutor.startWorkflow(WAIT_TIME_OUT_WORKFLOW, 1, '', [:], null, null, null)