use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class TestHelper method assertAndEnsureNoProcessApplicationsRegistered.
public static String assertAndEnsureNoProcessApplicationsRegistered(ProcessEngine processEngine) {
ProcessEngineConfigurationImpl engineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
ProcessApplicationManager processApplicationManager = engineConfiguration.getProcessApplicationManager();
if (processApplicationManager.hasRegistrations()) {
processApplicationManager.clearRegistrations();
return "There are still process applications registered";
} else {
return null;
}
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class TestHelper method assertAndEnsureCleanDeploymentCache.
/**
* Ensures that the deployment cache is empty after a test. If not the cache
* will be cleared.
*
* @param processEngine the {@link ProcessEngine} to test
* @param fail if true the method will throw an {@link AssertionError} if the deployment cache is not clean
* @return the deployment cache summary if fail is set to false or null if deployment cache was clean
* @throws AssertionError if the deployment cache was not clean and fail is set to true
*/
public static String assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine, boolean fail) {
StringBuilder outputMessage = new StringBuilder();
ProcessEngineConfigurationImpl processEngineConfiguration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
CachePurgeReport cachePurgeReport = processEngineConfiguration.getDeploymentCache().purgeCache();
outputMessage.append(cachePurgeReport.getPurgeReportAsString());
if (outputMessage.length() > 0) {
outputMessage.insert(0, "Deployment cache not clean:\n");
LOG.error(outputMessage.toString());
if (fail) {
Assert.fail(outputMessage.toString());
}
return outputMessage.toString();
} else {
LOG.debug("Deployment cache was clean");
return null;
}
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class BatchSuspensionTest method saveAndReduceBatchJobsPerSeed.
@Before
public void saveAndReduceBatchJobsPerSeed() {
ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration();
defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed();
// reduce number of batch jobs per seed to not have to create a lot of instances
configuration.setBatchJobsPerSeed(1);
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class BatchPriorityTest method saveAndReduceBatchConfiguration.
@Before
public void saveAndReduceBatchConfiguration() {
ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration();
defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed();
defaultBatchJobPriority = configuration.getBatchJobPriority();
// reduce number of batch jobs per seed to not have to create a lot of instances
configuration.setBatchJobsPerSeed(1);
}
use of org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl in project camunda-bpm-platform by camunda.
the class BatchPriorityTest method resetBatchJobsPerSeed.
@After
public void resetBatchJobsPerSeed() {
ProcessEngineConfigurationImpl processEngineConfiguration = engineRule.getProcessEngineConfiguration();
processEngineConfiguration.setBatchJobsPerSeed(defaultBatchJobsPerSeed);
processEngineConfiguration.setBatchJobPriority(defaultBatchJobPriority);
}
Aggregations