use of org.camunda.bpm.qa.upgrade.util.CompleteTaskThread in project camunda-bpm-platform by camunda.
the class NestedInterruptingEventSubprocessParallelScenarioTest method testInitSynchronization.
@Test
@ScenarioUnderTest("init.1")
public void testInitSynchronization() {
// given
Task eventSubProcessTask1 = rule.taskQuery().taskDefinitionKey("innerEventSubProcessTask1").singleResult();
Task eventSubProcessTask2 = rule.taskQuery().taskDefinitionKey("innerEventSubProcessTask2").singleResult();
// when
CompleteTaskThread completeTaskThread1 = new CompleteTaskThread(eventSubProcessTask1.getId(), (ProcessEngineConfigurationImpl) rule.getProcessEngine().getProcessEngineConfiguration());
CompleteTaskThread completeTaskThread2 = new CompleteTaskThread(eventSubProcessTask2.getId(), (ProcessEngineConfigurationImpl) rule.getProcessEngine().getProcessEngineConfiguration());
completeTaskThread1.startAndWaitUntilControlIsReturned();
completeTaskThread2.startAndWaitUntilControlIsReturned();
completeTaskThread1.proceedAndWaitTillDone();
completeTaskThread2.proceedAndWaitTillDone();
// then
Assert.assertNull(completeTaskThread1.getException());
Assert.assertNotNull(completeTaskThread2.getException());
}
Aggregations