use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl in project camunda-bpm-platform by camunda.
the class StartManagedThreadPoolStepTest method setUp.
@Before
public void setUp() {
step = new StartManagedThreadPoolStep();
deploymentOperation = new DeploymentOperation("name", container, Collections.<DeploymentOperationStep>emptyList());
jobExecutorXml = new JobExecutorXmlImpl();
bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>emptyList());
deploymentOperation.addAttachment(Attachments.BPM_PLATFORM_XML, bpmPlatformXml);
}
use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl in project camunda-bpm-platform by camunda.
the class PlatformJobExecutorActivateTest method shouldAutoActivateIfNoPropertySet.
@Test
public void shouldAutoActivateIfNoPropertySet() {
// given
JobExecutorXmlImpl jobExecutorXml = defineJobExecutor();
ProcessEngineXmlImpl processEngineXml = defineProcessEngine();
BpmPlatformXmlImpl bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>singletonList(processEngineXml));
// when
deployPlatform(bpmPlatformXml);
try {
ProcessEngine processEngine = getProcessEngine(ENGINE_NAME);
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
// then
assertEquals(true, processEngineConfiguration.getJobExecutor().isActive());
} finally {
undeployPlatform();
}
}
use of org.camunda.bpm.container.impl.metadata.BpmPlatformXmlImpl in project camunda-bpm-platform by camunda.
the class PlatformJobExecutorActivateTest method shouldNotAutoActivateIfConfigured.
@Test
public void shouldNotAutoActivateIfConfigured() {
// given
JobExecutorXmlImpl jobExecutorXml = defineJobExecutor();
ProcessEngineXmlImpl processEngineXml = defineProcessEngine();
// activate set to false
processEngineXml.getProperties().put("jobExecutorActivate", "false");
BpmPlatformXmlImpl bpmPlatformXml = new BpmPlatformXmlImpl(jobExecutorXml, Collections.<ProcessEngineXml>singletonList(processEngineXml));
// when
deployPlatform(bpmPlatformXml);
try {
ProcessEngine processEngine = getProcessEngine(ENGINE_NAME);
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
// then
assertEquals(false, processEngineConfiguration.getJobExecutor().isActive());
} finally {
undeployPlatform();
}
}
Aggregations