use of com.netflix.conductor.common.run.Workflow in project conductor by Netflix.
the class TestElasticSearchRestDAOV7 method shouldAsyncUpdateWorkflow.
@Test
public void shouldAsyncUpdateWorkflow() throws Exception {
Workflow workflow = TestUtils.loadWorkflowSnapshot("workflow");
WorkflowSummary summary = new WorkflowSummary(workflow);
indexDAO.indexWorkflow(workflow);
indexDAO.asyncUpdateWorkflow(workflow.getWorkflowId(), new String[] { "status" }, new Object[] { Workflow.WorkflowStatus.FAILED }).get();
summary.setStatus(Workflow.WorkflowStatus.FAILED);
assertWorkflowSummary(workflow.getWorkflowId(), summary);
}
use of com.netflix.conductor.common.run.Workflow in project conductor by Netflix.
the class TestElasticSearchRestDAOV7 method shouldIndexTask.
@Test
public void shouldIndexTask() {
Workflow workflow = TestUtils.loadWorkflowSnapshot("workflow");
Task task = workflow.getTasks().get(0);
TaskSummary summary = new TaskSummary(task);
indexDAO.indexTask(task);
List<String> tasks = tryFindResults(() -> searchTasks(workflow));
assertEquals(summary.getTaskId(), tasks.get(0));
}
use of com.netflix.conductor.common.run.Workflow in project conductor by Netflix.
the class TestElasticSearchRestDAOV7 method shouldIndexTaskAsync.
@Test
public void shouldIndexTaskAsync() throws Exception {
Workflow workflow = TestUtils.loadWorkflowSnapshot("workflow");
Task task = workflow.getTasks().get(0);
TaskSummary summary = new TaskSummary(task);
indexDAO.asyncIndexTask(task).get();
List<String> tasks = tryFindResults(() -> searchTasks(workflow));
assertEquals(summary.getTaskId(), tasks.get(0));
}
use of com.netflix.conductor.common.run.Workflow in project conductor by Netflix.
the class TestElasticSearchRestDAOV7 method shouldIndexWorkflow.
@Test
public void shouldIndexWorkflow() {
Workflow workflow = TestUtils.loadWorkflowSnapshot("workflow");
WorkflowSummary summary = new WorkflowSummary(workflow);
indexDAO.indexWorkflow(workflow);
assertWorkflowSummary(workflow.getWorkflowId(), summary);
}
use of com.netflix.conductor.common.run.Workflow in project conductor by Netflix.
the class TestElasticSearchRestDAOV7 method shouldAsyncRemoveWorkflow.
@Test
public void shouldAsyncRemoveWorkflow() throws Exception {
Workflow workflow = TestUtils.loadWorkflowSnapshot("workflow");
indexDAO.indexWorkflow(workflow);
// wait for workflow to be indexed
List<String> workflows = tryFindResults(() -> searchWorkflows(workflow.getWorkflowId()), 1);
assertEquals(1, workflows.size());
indexDAO.asyncRemoveWorkflow(workflow.getWorkflowId()).get();
workflows = tryFindResults(() -> searchWorkflows(workflow.getWorkflowId()), 0);
assertTrue("Workflow was not removed.", workflows.isEmpty());
}
Aggregations