Skip to content

Commit

Permalink
test(engine): remove CRDB-specific test method and add exclusion comm…
Browse files Browse the repository at this point in the history
…ent (camunda#3511)

related to camunda#2605
  • Loading branch information
tmetzke authored Jun 19, 2023
1 parent c9497b1 commit 8ef21f7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.assertj.core.api.Assertions;
import org.camunda.bpm.engine.HistoryService;
import org.camunda.bpm.engine.ManagementService;
Expand Down Expand Up @@ -410,30 +409,6 @@ public void testMigrationJobsExecutionByJobExecutorWithAuthorizationEnabledAndTe
}
}

@Test
@RequiredDatabase(includes = DbSqlSessionFactory.CRDB)
public void testMigrationJobsExecutionByJobExecutorWithAuthorizationEnabledAndTenantUsesCockroachDB() {
ProcessEngineConfigurationImpl processEngineConfiguration = engineRule.getProcessEngineConfiguration();

processEngineConfiguration.setAuthorizationEnabled(true);

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

// extend waiting time for CRDB since it takes longer to process all the jobs there
// see CAM-12239 for more details
testRule.waitForJobExecutorToProcessAllJobs(30000L);

// then all process instances where migrated
assertEquals(0, helper.countSourceProcessInstances());
assertEquals(10, helper.countTargetProcessInstances());

} finally {
processEngineConfiguration.setAuthorizationEnabled(false);
}
}

@Test
public void testNumberOfJobsCreatedBySeedJobPerInvocation() {
// reduce number of batch jobs per seed to not have to create a lot of instances
Expand Down Expand Up @@ -986,6 +961,7 @@ public GetByteArrayCommand(String byteArrayId) {
this.byteArrayId = byteArrayId;
}

@Override
public ByteArrayEntity execute(CommandContext commandContext) {
return (ByteArrayEntity) commandContext.getDbEntityManager()
.selectOne("selectByteArray", byteArrayId);
Expand Down
22 changes: 22 additions & 0 deletions qa/test-old-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@
</build>
</profile>

<profile>
<id>cockroachdb</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
<trimStackTrace>false</trimStackTrace>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<excludes combine.children="append">
<!-- One test method here is known to cause timeout issues.
Can be removed with 7.21.0 as the method in question is removed
in 7.20.0. -->
<exclude>**/BatchMigrationTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>mariadb</id>
<build>
Expand Down

0 comments on commit 8ef21f7

Please sign in to comment.