jobs.add(new Job("FailAction"));
}
TestUtils.enqueueJobs("bar", jobs, config);
}
final Worker worker = new WorkerImpl(config, Arrays.asList("foo0", "bar", "baz"),
new MapBasedJobFactory(map(entry("TestAction", TestAction.class),
entry("FailAction", FailAction.class))));
final Thread workerThread = new Thread(worker);
workerThread.start();
TestUtils.enqueueJobs("inf", Arrays.asList(new Job("InfiniteAction")), config);
final Worker worker2 = new WorkerImpl(config, Arrays.asList("inf"),
new MapBasedJobFactory(map(entry("InfiniteAction", InfiniteAction.class))));
final Thread workerThread2 = new Thread(worker2);
workerThread2.start();
worker2.togglePause(true);
workerThread.join();