use of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration in project camunda-bpm-platform by camunda.
the class MultiEngineCommandContextTest method createProcessEngine.
private ProcessEngine createProcessEngine(String name) {
StandaloneInMemProcessEngineConfiguration processEngineConfiguration = new StandaloneInMemProcessEngineConfiguration();
processEngineConfiguration.setProcessEngineName(name);
processEngineConfiguration.setJdbcUrl(String.format("jdbc:h2:mem:%s", name));
return processEngineConfiguration.buildProcessEngine();
}
use of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration in project camunda-bpm-platform by camunda.
the class DatabaseHistoryPropertyAutoTest method config.
private static ProcessEngineConfigurationImpl config(final String schemaUpdate, final String historyLevel) {
StandaloneInMemProcessEngineConfiguration engineConfiguration = new StandaloneInMemProcessEngineConfiguration();
engineConfiguration.setProcessEngineName(UUID.randomUUID().toString());
engineConfiguration.setDatabaseSchemaUpdate(schemaUpdate);
engineConfiguration.setHistory(historyLevel);
engineConfiguration.setDbMetricsReporterActivate(false);
engineConfiguration.setJdbcUrl("jdbc:h2:mem:DatabaseHistoryPropertyAutoTest");
return engineConfiguration;
}
use of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration in project camunda-bpm-platform by camunda.
the class ForceCloseMybatisConnectionPoolTest method testForceCloseMybatisConnectionPoolTrue.
@Test
public void testForceCloseMybatisConnectionPoolTrue() {
// given
// that the process engine is configured with forceCloseMybatisConnectionPool = true
ProcessEngineConfigurationImpl configurationImpl = new StandaloneInMemProcessEngineConfiguration().setJdbcUrl("jdbc:h2:mem:camunda-forceclose").setProcessEngineName("engine-forceclose").setForceCloseMybatisConnectionPool(true);
ProcessEngine processEngine = configurationImpl.buildProcessEngine();
PooledDataSource pooledDataSource = (PooledDataSource) configurationImpl.getDataSource();
PoolState state = pooledDataSource.getPoolState();
// then
// if the process engine is closed
processEngine.close();
// the idle connections are closed
Assert.assertTrue(state.getIdleConnectionCount() == 0);
}
use of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration in project camunda-bpm-platform by camunda.
the class DatabaseTableSchemaTest method testCreateConfigurationWithMissingDotInSchemaAndPrefix.
public void testCreateConfigurationWithMissingDotInSchemaAndPrefix() {
try {
StandaloneInMemProcessEngineConfiguration configuration = new StandaloneInMemProcessEngineConfiguration();
configuration.setDatabaseSchema("foo");
configuration.setDatabaseTablePrefix("foo");
configuration.buildProcessEngine();
fail("Should throw exception");
} catch (ProcessEngineException e) {
// as expected
assertTrue(e.getMessage().contains("When setting a schema the prefix has to be schema + '.'"));
}
}
use of org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration in project camunda-bpm-platform by camunda.
the class DmnDisabledTest method createProcessEngineImpl.
protected static ProcessEngineImpl createProcessEngineImpl(boolean dmnEnabled) {
StandaloneInMemProcessEngineConfiguration config = (StandaloneInMemProcessEngineConfiguration) new CustomStandaloneInMemProcessEngineConfiguration().setProcessEngineName("database-dmn-test-engine").setDatabaseSchemaUpdate("false").setHistory(ProcessEngineConfiguration.HISTORY_FULL).setJdbcUrl("jdbc:h2:mem:DatabaseDmnTest");
config.setDmnEnabled(dmnEnabled);
return (ProcessEngineImpl) config.buildProcessEngine();
}
Aggregations