use of com.netflix.conductor.common.run.TaskSummary in project conductor by Netflix.
the class TestElasticSearchRestDAOV6 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.TaskSummary in project conductor by Netflix.
the class TestElasticSearchDAOV6 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.TaskSummary in project conductor by Netflix.
the class TaskResourceTest method search.
@Test
public void search() {
Task task = new Task();
task.setTaskType("SIMPLE");
task.setWorkerId("123");
task.setDomain("test");
task.setStatus(Task.Status.IN_PROGRESS);
TaskSummary taskSummary = new TaskSummary(task);
ArrayList<TaskSummary> listOfTaskSummary = new ArrayList<TaskSummary>() {
{
add(taskSummary);
}
};
SearchResult<TaskSummary> searchResult = new SearchResult<TaskSummary>(100, listOfTaskSummary);
listOfTaskSummary.add(taskSummary);
when(mockTaskService.search(anyInt(), anyInt(), anyString(), anyString(), anyString())).thenReturn(searchResult);
assertEquals(searchResult, taskResource.search(0, 100, "asc", "*", "*"));
}
Aggregations