use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class AsyncParallelMultiInstanceScenarioTest method testInitAsyncBeforeSubprocessJobDefinition.
/**
* Note: this test is not really isolated since the job
* definition is migrated when the process definition is accessed the first time.
* This might happen already before this test case is executed.
*/
@Test
@ScenarioUnderTest("initAsyncBeforeSubprocess.4")
public void testInitAsyncBeforeSubprocessJobDefinition() {
// when the process is redeployed into the cache (instantiation should trigger that)
rule.getRuntimeService().startProcessInstanceByKey("AsyncBeforeParallelMultiInstanceSubprocess");
// then the old job definition referencing "miSubProcess" has been migrated
JobDefinition asyncJobDefinition = rule.jobDefinitionQuery().singleResult();
Assert.assertEquals("miSubProcess#multiInstanceBody", asyncJobDefinition.getActivityId());
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class AsyncParallelMultiInstanceScenarioTest method testInitAsyncBeforeTaskJobDefinition.
/**
* Note: this test is not really isolated since the job
* definition is migrated when the process definition is accessed the first time.
* This might happen already before this test case is executed.
*/
@Test
@ScenarioUnderTest("initAsyncBeforeTask.4")
public void testInitAsyncBeforeTaskJobDefinition() {
// when the process is redeployed into the cache (instantiation should trigger that)
rule.getRuntimeService().startProcessInstanceByKey("AsyncBeforeParallelMultiInstanceTask");
// then the old job definition referencing "miSubProcess" has been migrated
JobDefinition asyncJobDefinition = rule.jobDefinitionQuery().singleResult();
Assert.assertEquals("miTask#multiInstanceBody", asyncJobDefinition.getActivityId());
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class AsyncParallelMultiInstanceScenarioTest method testInitAsyncBeforeSubprocessDeletion.
@Test
@ScenarioUnderTest("initAsyncBeforeSubprocess.3")
public void testInitAsyncBeforeSubprocessDeletion() {
// given
ProcessInstance instance = rule.processInstance();
// when
rule.getRuntimeService().deleteProcessInstance(instance.getId(), null);
// then
rule.assertScenarioEnded();
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class MultiInstanceReceiveTaskScenarioTest method testInitSequentialActivityInstanceTree.
@Test
@ScenarioUnderTest("initSequential.2")
public void testInitSequentialActivityInstanceTree() {
// given
ProcessInstance instance = rule.processInstance();
// when
ActivityInstance activityInstance = rule.getRuntimeService().getActivityInstance(instance.getId());
// then
Assert.assertNotNull(activityInstance);
assertThat(activityInstance).hasStructure(describeActivityInstanceTree(instance.getProcessDefinitionId()).activity("miReceiveTask").done());
}
use of org.camunda.bpm.qa.upgrade.ScenarioUnderTest in project camunda-bpm-platform by camunda.
the class MultiInstanceReceiveTaskScenarioTest method testInitParallelMigration.
@Test
@Ignore("CAM-6408")
@ScenarioUnderTest("initParallel.4")
public void testInitParallelMigration() {
// given
ProcessInstance instance = rule.processInstance();
MigrationPlan migrationPlan = rule.getRuntimeService().createMigrationPlan(instance.getProcessDefinitionId(), instance.getProcessDefinitionId()).mapEqualActivities().build();
// when
rule.getRuntimeService().newMigration(migrationPlan).processInstanceIds(instance.getId()).execute();
// then the receive task messages can be correlated
rule.messageCorrelation("Message").correlateAll();
rule.assertScenarioEnded();
}
Aggregations