Skip to content

Commit

Permalink
chore(engine/test): improve test for CAM-6038
Browse files Browse the repository at this point in the history
- deploy process for tenant so that test actually fails without the fix.

related to CAM-6038
  • Loading branch information
meyerdan committed May 23, 2016
1 parent 5a398c9 commit a28cf7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public Batch migrateProcessInstancesAsync(int numberOfProcessInstances) {
return migrateProcessInstancesAsync(numberOfProcessInstances, sourceProcessDefinition, targetProcessDefinition);
}

public Batch migrateProcessInstancesAsyncForTenant(int numberOfProcessInstances, String tenantId) {
sourceProcessDefinition = migrationRule.deployForTenantAndGetDefinition(tenantId, ProcessModels.ONE_TASK_PROCESS);
targetProcessDefinition = migrationRule.deployForTenantAndGetDefinition(tenantId, ProcessModels.ONE_TASK_PROCESS);
return migrateProcessInstancesAsync(numberOfProcessInstances, sourceProcessDefinition, targetProcessDefinition);
}

public Batch migrateProcessInstanceAsync(ProcessDefinition sourceProcessDefinition, ProcessDefinition targetProcessDefinition) {
return migrateProcessInstancesAsync(1, sourceProcessDefinition, targetProcessDefinition);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ public void testMigrationJobsExecution() {
}

@Test
public void testMigrationJobsExecutionByJobExecutorWithAuthorizationEnabled() {
public void testMigrationJobsExecutionByJobExecutorWithAuthorizationEnabledAndTenant() {
ProcessEngineConfigurationImpl processEngineConfiguration = engineRule.getProcessEngineConfiguration();

processEngineConfiguration.setAuthorizationEnabled(true);

try {
Batch batch = helper.migrateProcessInstancesAsync(10);
Batch batch = helper.migrateProcessInstancesAsyncForTenant(10, "someTenantId");
helper.executeSeedJob(batch);

testRule.waitForJobExecutorToProcessAllJobs();
Expand Down

0 comments on commit a28cf7a

Please sign in to comment.