-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(webapps): add skipIsolationLevelCheck to configuration on webapp …
…init Related to #4867
- Loading branch information
1 parent
7e310e0
commit d8442a7
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
webapps/assembly/src/test/java/org/camunda/bpm/webapp/impl/db/QuerySessionFactoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.camunda.bpm.webapp.impl.db; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.Collections; | ||
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; | ||
import org.camunda.bpm.engine.test.ProcessEngineRule; | ||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
public class QuerySessionFactoryTest { | ||
|
||
@Rule | ||
public ProcessEngineRule processEngineRule = new ProcessEngineRule("camunda-skip-check.cfg.xml"); | ||
|
||
private ProcessEngineConfigurationImpl processEngineConfiguration; | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
processEngineConfiguration = processEngineRule.getProcessEngineConfiguration(); | ||
} | ||
|
||
@Test | ||
public void testQuerySessionFactoryInitializationFromEngineConfig() { | ||
// given | ||
QuerySessionFactory querySessionFactory = new QuerySessionFactory(); | ||
processEngineConfiguration = processEngineRule.getProcessEngineConfiguration(); | ||
|
||
// when | ||
querySessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, Collections.emptyList()); | ||
|
||
// then | ||
assertThat(querySessionFactory.getWrappedConfiguration()).isEqualTo(processEngineConfiguration); | ||
assertThat(querySessionFactory.getDatabaseType()).isEqualTo(processEngineConfiguration.getDatabaseType()); | ||
assertThat(querySessionFactory.getDataSource()).isEqualTo(processEngineConfiguration.getDataSource()); | ||
assertThat(querySessionFactory.getDatabaseTablePrefix()).isEqualTo(processEngineConfiguration.getDatabaseTablePrefix()); | ||
assertThat(querySessionFactory.getSkipIsolationLevelCheck()).isTrue(); | ||
assertThat(querySessionFactory.getHistoryLevel()).isEqualTo(processEngineConfiguration.getHistoryLevel()); | ||
assertThat(querySessionFactory.getHistory()).isEqualTo(processEngineConfiguration.getHistory()); | ||
|
||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
webapps/assembly/src/test/resources/camunda-skip-check.cfg.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | ||
|
||
|
||
<bean id="idGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" /> | ||
|
||
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration"> | ||
|
||
<property name="jdbcUrl" value="${database.url}" /> | ||
<property name="jdbcDriver" value="${database.driver}" /> | ||
<property name="jdbcUsername" value="${database.username}" /> | ||
<property name="jdbcPassword" value="${database.password}" /> | ||
|
||
<!-- Database configurations --> | ||
<property name="databaseSchemaUpdate" value="true" /> | ||
<property name="skipIsolationLevelCheck" value="true" /> | ||
|
||
<property name="idGenerator" ref="idGenerator" /> | ||
|
||
<!-- job executor configurations --> | ||
<property name="jobExecutorActivate" value="false" /> | ||
|
||
<!-- turn on metrics reporter --> | ||
<property name="metricsEnabled" value="true" /> | ||
<property name="dbMetricsReporterActivate" value="true" /> | ||
<property name="taskMetricsEnabled" value="true" /> | ||
|
||
<!-- mail server configurations --> | ||
<property name="mailServerPort" value="5025" /> | ||
<property name="history" value="${history.level}" /> | ||
|
||
<property name="authorizationCheckRevokes" value="${authorizationCheckRevokes}"/> | ||
|
||
<property name="jdbcBatchProcessing" value="${jdbcBatchProcessing}"/> | ||
<property name="enforceHistoryTimeToLive" value="false" /> | ||
|
||
</bean> | ||
</beans> |