use of org.camunda.bpm.engine.batch.Batch in project camunda-bpm-platform by camunda.
the class BatchPriorityTest method executionJobShouldGetPriorityFromProcessEngineConfiguration.
@Test
public void executionJobShouldGetPriorityFromProcessEngineConfiguration() {
// given
setBatchJobPriority(CUSTOM_PRIORITY);
Batch batch = helper.migrateProcessInstancesAsync(1);
// when
helper.executeSeedJob(batch);
// then
Job executionJob = helper.getExecutionJobs(batch).get(0);
assertEquals(CUSTOM_PRIORITY, executionJob.getPriority());
}
use of org.camunda.bpm.engine.batch.Batch in project camunda-bpm-platform by camunda.
the class BatchPriorityTest method monitorJobShouldGetPriorityFromProcessEngineConfiguration.
@Test
public void monitorJobShouldGetPriorityFromProcessEngineConfiguration() {
// given
setBatchJobPriority(CUSTOM_PRIORITY);
Batch batch = helper.migrateProcessInstancesAsync(1);
// when
helper.executeSeedJob(batch);
// then
Job monitorJob = helper.getMonitorJob(batch);
assertEquals(CUSTOM_PRIORITY, monitorJob.getPriority());
}
use of org.camunda.bpm.engine.batch.Batch in project camunda-bpm-platform by camunda.
the class HistoryCleanupHistoricBatchTest method createModificationBatch.
private Batch createModificationBatch() {
BpmnModelInstance instance = createModelInstance();
ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance);
Batch modificationBatch = modificationHelper.startAfterAsync("process", 1, "userTask1", processDefinition.getId());
return modificationBatch;
}
use of org.camunda.bpm.engine.batch.Batch in project camunda-bpm-platform by camunda.
the class MultiTenancyBatchTest method testActivateBatchFailsWithWrongTenant.
@Test
public void testActivateBatchFailsWithWrongTenant() {
// given
Batch batch = batchHelper.migrateProcessInstanceAsync(tenant2Definition, tenant2Definition);
managementService.suspendBatchById(batch.getId());
// when
identityService.setAuthentication("user", null, singletonList(TENANT_ONE));
try {
managementService.activateBatchById(batch.getId());
Assert.fail("exception expected");
} catch (ProcessEngineException e) {
// then
Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Cannot activate batch '" + batch.getId() + "' because it belongs to no authenticated tenant"));
} finally {
identityService.clearAuthentication();
}
}
use of org.camunda.bpm.engine.batch.Batch in project camunda-bpm-platform by camunda.
the class MultiTenancyBatchTest method testDeleteBatchFailsWithWrongTenant.
@Test
public void testDeleteBatchFailsWithWrongTenant() {
// given
Batch batch = batchHelper.migrateProcessInstanceAsync(tenant2Definition, tenant2Definition);
// when
identityService.setAuthentication("user", null, singletonList(TENANT_ONE));
try {
managementService.deleteBatch(batch.getId(), true);
Assert.fail("exception expected");
} catch (ProcessEngineException e) {
// then
Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Cannot delete batch '" + batch.getId() + "' because it belongs to no authenticated tenant"));
} finally {
identityService.clearAuthentication();
}
}
Aggregations