use of eu.bcvsolutions.idm.core.scheduler.task.impl.TestTaskExecutor in project CzechIdMng by bcvsolutions.
the class DefaultLongRunningTaskManagerIntegrationTest method testDisallowConcurrentExecution.
@Test(expected = ConcurrentExecutionException.class)
public void testDisallowConcurrentExecution() {
TestTaskExecutor executorOne = new TestTaskExecutor();
executorOne.setCount(30L);
LongRunningFutureTask<Boolean> longRunningFutureTask = manager.execute(executorOne);
helper.waitForResult(res -> {
return !service.get(longRunningFutureTask.getExecutor().getLongRunningTaskId()).isRunning();
});
TestTaskExecutor executorTwo = new TestTaskExecutor();
executorTwo.setCount(10L);
manager.executeSync(executorTwo);
}
Aggregations