use of com.netflix.conductor.contribs.queue.QueueManager in project conductor by Netflix.
the class TestQueueManager method testFailure.
@Test(expected = IllegalArgumentException.class)
public void testFailure() throws Exception {
Map<Status, ObservableQueue> queues = new HashMap<>();
queues.put(Status.COMPLETED, queue);
QueueManager qm = new QueueManager(queues, es, objectMapper);
qm.updateByTaskRefName("v_1", "t1", new HashMap<>(), Status.CANCELED);
Uninterruptibles.sleepUninterruptibly(1_000, TimeUnit.MILLISECONDS);
}
use of com.netflix.conductor.contribs.queue.QueueManager in project conductor by Netflix.
the class TestQueueManager method test.
@Test
public void test() throws Exception {
Map<Status, ObservableQueue> queues = new HashMap<>();
queues.put(Status.COMPLETED, queue);
QueueManager qm = new QueueManager(queues, es, objectMapper);
qm.updateByTaskRefName("v_0", "t0", new HashMap<>(), Status.COMPLETED);
Uninterruptibles.sleepUninterruptibly(1_000, TimeUnit.MILLISECONDS);
assertTrue(updatedTasks.stream().anyMatch(task -> task.getTaskId().equals("t0")));
}
use of com.netflix.conductor.contribs.queue.QueueManager in project conductor by Netflix.
the class TestQueueManager method testWithTaskId.
@Test
public void testWithTaskId() throws Exception {
Map<Status, ObservableQueue> queues = new HashMap<>();
queues.put(Status.COMPLETED, queue);
QueueManager qm = new QueueManager(queues, es, objectMapper);
qm.updateByTaskId("v_2", "t2", new HashMap<>(), Status.COMPLETED);
Uninterruptibles.sleepUninterruptibly(1_000, TimeUnit.MILLISECONDS);
assertTrue(updatedTasks.stream().anyMatch(task -> task.getTaskId().equals("t2")));
}
Aggregations