Skip to content

Commit

Permalink
Merge pull request #2 from gmunozfe/bump-h2-2.2.220
Browse files Browse the repository at this point in the history
[bump h2-200] Fix integration and springboot tests
  • Loading branch information
tkobayas authored Jul 26, 2023
2 parents dd66902 + 6bc50fe commit 2ef3993
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<bean id="ds" class="org.kie.aries.blueprint.mocks.MockDataSource">
<property name="driverClassName" value="org.h2.Driver"/>
<property name="url" value="jdbc:h2:tcp://localhost/DroolsFlow;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE"/>
<property name="url" value="jdbc:h2:tcp://localhost/DroolsFlow;MODE=LEGACY;NON_KEYWORDS=VALUE"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
Expand Down
4 changes: 2 additions & 2 deletions kie-osgi/kie-karaf-itests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<maven.jdbc.driver.jar/>
<maven.jdbc.username>sa</maven.jdbc.username>
<maven.jdbc.password>sa</maven.jdbc.password>
<maven.jdbc.url>jdbc:h2:mem:test_mem;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</maven.jdbc.url>
<maven.jdbc.tcp.url>jdbc:h2:tcp://localhost/${project.basedir}/target/kie-karaf-itests;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</maven.jdbc.tcp.url>
<maven.jdbc.url>jdbc:h2:mem:test_mem;MODE=LEGACY;NON_KEYWORDS=VALUE</maven.jdbc.url>
<maven.jdbc.tcp.url>jdbc:h2:tcp://localhost/${project.basedir}/target/kie-karaf-itests;MODE=LEGACY;NON_KEYWORDS=VALUE</maven.jdbc.tcp.url>
<maven.jdbc.schema>public</maven.jdbc.schema>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public Object call() {
public static Server startH2Server() {
try {
// start h2 in memory database
Server server = Server.createTcpServer(new String[0]);
Server server = Server.createTcpServer(new String[]{"-ifNotExists"});
server.start();
return server;
} catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void before() throws Throwable {
Properties driverProperties = new Properties();
driverProperties.setProperty("user", "sa");
driverProperties.setProperty("password", "");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("className", "org.h2.jdbcx.JdbcDataSource");
driverProperties.setProperty("driverClassName", "org.h2.Driver");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected void before() throws Throwable {
Properties driverProperties = new Properties();
driverProperties.setProperty("user", "sa");
driverProperties.setProperty("password", "");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("className", "org.h2.jdbcx.JdbcDataSource");
driverProperties.setProperty("driverClassName", "org.h2.Driver");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected void before() throws Throwable {
Properties driverProperties = new Properties();
driverProperties.setProperty("user", "sa");
driverProperties.setProperty("password", "");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("className", "org.h2.jdbcx.JdbcDataSource");
driverProperties.setProperty("driverClassName", "org.h2.Driver");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void before() throws Throwable {
Properties driverProperties = new Properties();
driverProperties.setProperty("user", "sa");
driverProperties.setProperty("password", "");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
driverProperties.setProperty("url", "jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("className", "org.h2.jdbcx.JdbcDataSource");
driverProperties.setProperty("driverClassName", "org.h2.Driver");

Expand Down
8 changes: 4 additions & 4 deletions kie-server-parent/kie-server-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<!-- Kie server datasource configuration. -->
<!-- <org.kie.server.persistence.ds/> Defined in container profiles.-->
<org.kie.server.persistence.dialect>org.hibernate.dialect.H2Dialect</org.kie.server.persistence.dialect>
<org.kie.server.datasource.connection.url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</org.kie.server.datasource.connection.url>
<org.kie.server.datasource.connection.url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=LEGACY;NON_KEYWORDS=VALUE</org.kie.server.datasource.connection.url>
<org.kie.server.datasource.username>sa</org.kie.server.datasource.username>
<org.kie.server.datasource.password>sa</org.kie.server.datasource.password>
<org.kie.server.datasource.driver.class>org.h2.jdbcx.JdbcDataSource</org.kie.server.datasource.driver.class>
Expand Down Expand Up @@ -660,7 +660,7 @@
<parameters>
<user>sa</user>
<password>sa</password>
<url>jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE</url>
<url>jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;MODE=LEGACY;NON_KEYWORDS=VALUE</url>
<description>H2 Data Source</description>
<loginTimeout>0</loginTimeout>
<testOnBorrow>false</testOnBorrow>
Expand Down Expand Up @@ -1182,7 +1182,7 @@
<!-- Datasource -->
<cargo.datasource.datasource.h2>
cargo.datasource.driver=org.h2.Driver|
cargo.datasource.url=jdbc:h2:mem:test-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE|
cargo.datasource.url=jdbc:h2:mem:test-db;MODE=LEGACY;NON_KEYWORDS=VALUE|
cargo.datasource.jndi=jdbc/jbpm|
cargo.datasource.username=sa|
cargo.datasource.password=|
Expand Down Expand Up @@ -1318,7 +1318,7 @@
<!-- Datasource -->
<cargo.datasource.datasource.h2>
cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
cargo.datasource.url=jdbc:h2:mem:test-db;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE|
cargo.datasource.url=jdbc:h2:mem:test-db;MODE=LEGACY;NON_KEYWORDS=VALUE|
cargo.datasource.jndi=jdbc/jbpm|
cargo.datasource.username=sa|
cargo.datasource.password=|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public DataSource secondaryDataSource() {
@ConditionalOnMissingBean(name = "auditEntityManagerFactory")
@ConditionalOnProperty(name = "kieserver.audit-replication.consumer", havingValue = "true")
public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("datasource-replica") DataSource dataSource, JpaProperties jpaProperties) {
jpaProperties.getProperties().put("url", "jdbc:h2:mem:kieserver-replication;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE");
jpaProperties.getProperties().put("url", "jdbc:h2:mem:kieserver-replication;MODE=LEGACY;NON_KEYWORDS=VALUE");
return EntityManagerFactoryHelper.create(applicationContext,
dataSource,
jpaProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jbpm.executor.enabled=false
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:mem:kieserver;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:mem:kieserver;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver
spring.h2.console.enabled=true

spring.datasource.second.url=jdbc:h2:mem:kieserver-replica;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.second.url=jdbc:h2:mem:kieserver-replica;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.second.username=sa
spring.datasource.second.password=sa
spring.datasource.second.driverClassName=org.h2.Driver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server.port=8090
spring.datasource.name=jbpm
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver

narayana.dbcp.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jbpm.quartz.configuration=quartz-db.properties
quartz.datasource.name=quartz
quartz.datasource.username=sa
quartz.datasource.password=sa
quartz.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
quartz.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
quartz.datasource.driver-class-name=org.h2.Driver

quartz.datasource.dbcp2.maxTotal=15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,7 @@
-- In your Quartz properties file, you'll need to set
-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate

DROP TABLE IF EXISTS QRTZ_CALENDARS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_TRIGGER_LISTENERS;
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
DROP ALL OBJECTS;

CREATE TABLE QRTZ_CALENDARS (
SCHED_NAME VARCHAR(120) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kieserver.scenariosimulation.enabled=true
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver

narayana.dbcp.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kieserver.scenariosimulation.enabled=true
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver

narayana.dbcp.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kieserver.scenariosimulation.enabled=true
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver

narayana.dbcp.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kieserver.scenariosimulation.enabled=true
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver

narayana.dbcp.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spring.jpa.properties.hibernate.show_sql=false

spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-kafka-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-kafka-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Mandatory configuration that must be placed in application.properties is related
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.type=org.apache.tomcat.jdbc.pool.XADataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Mandatory configuration that must be placed in application.properties is related
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.type=org.apache.tomcat.jdbc.pool.XADataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Mandatory configuration that must be placed in application.properties is related
#data source configuration
spring.datasource.username=sa
spring.datasource.password=sa
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;OLD_INFORMATION_SCHEMA=TRUE
spring.datasource.url=jdbc:h2:./target/spring-boot-jbpm;MODE=LEGACY;NON_KEYWORDS=VALUE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.type=org.apache.tomcat.jdbc.pool.XADataSource
Expand Down

0 comments on commit 2ef3993

Please sign in to comment.