Skip to content

Commit

Permalink
Bump h2 from 1.4.197 to 2.2.220 (#285)
Browse files Browse the repository at this point in the history
* Bump h2 from 1.4.197 to 2.2.220

* [bump h2-200] Override default datasource url

---------

Co-authored-by: Gonzalo Muñoz <gmunozfe@redhat.com>
  • Loading branch information
tkobayas and gmunozfe committed Aug 1, 2023
1 parent 3bd3041 commit 1c06445
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void cleanup() {
*/
private static void setupDb() throws SQLException, URISyntaxException {
File script = new File(CamelSqlTest.class.getResource("/init-db.sql").toURI());
RunScript.execute("jdbc:h2:mem:jbpm-db;MVCC=true",
RunScript.execute("jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE",
"sa",
"",
script.getAbsolutePath(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private static PoolingDataSourceWrapper setupPoolingDataSource() throws Exceptio
driverProperties.setProperty("password",
"sa");
driverProperties.setProperty("url",
"jdbc:h2:mem:jpa-wih;MVCC=true");
"jdbc:h2:mem:jpa-wih;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("driverClassName",
"org.h2.Driver");

Expand All @@ -185,7 +185,7 @@ private static class TestH2Server {
public void start() {
if (realH2Server == null || !realH2Server.isRunning(false)) {
try {
realH2Server = Server.createTcpServer(new String[0]);
realH2Server = Server.createTcpServer(new String[]{"-ifNotExists"});
realH2Server.start();
System.out.println("Started H2 Server...");
} catch (SQLException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ server.port=8090
spring.jpa.properties.hibernate.hbm2ddl.auto=create
spring.jpa.properties.hibernate.show_sql=false

#override datasource url to skip VALUE as a keyword for embedded h2
spring.datasource.url=jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE

# Taken from https://docs.spring.io/spring-boot/docs/2.4.0-M2/reference/htmlsingle/#common-application-properties
# Used in Kafka tests where publish blocking connection timeout (max.block.ms) is 60 seconds, same as default
# transaction timeout for nayarana. If this timeout is not increased, following exception is raised:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ server.port=8090
spring.jpa.properties.hibernate.hbm2ddl.auto=create
spring.jpa.properties.hibernate.show_sql=false


#override datasource url to skip VALUE as a keyword for embedded h2
spring.datasource.url=jdbc:h2:mem:jbpm-db;MODE=LEGACY;NON_KEYWORDS=VALUE

# Taken from https://docs.spring.io/spring-boot/docs/2.4.0-M2/reference/htmlsingle/#common-application-properties
# Used in Kafka tests where publish blocking connection timeout (max.block.ms) is 60 seconds, same as default
# transaction timeout for nayarana. If this timeout is not increased, following exception is raised:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public static PoolingDataSourceWrapper setupPoolingDataSource() {
driverProperties.setProperty("password",
"sa");
driverProperties.setProperty("url",
"jdbc:h2:mem:jpa-wih;MVCC=true");
"jdbc:h2:mem:jpa-wih;MODE=LEGACY;NON_KEYWORDS=VALUE");
driverProperties.setProperty("driverClassName",
"org.h2.Driver");

Expand All @@ -373,7 +373,7 @@ private static class TestH2Server {
public void start() {
if (realH2Server == null || !realH2Server.isRunning(false)) {
try {
realH2Server = Server.createTcpServer(new String[0]);
realH2Server = Server.createTcpServer(new String[]{"-ifNotExists"});
realH2Server.start();
System.out.println("Started H2 Server...");
} catch (SQLException e) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<maven.jdbc.driver.jar/>
<maven.jdbc.username>sa</maven.jdbc.username>
<maven.jdbc.password>sasa</maven.jdbc.password>
<maven.jdbc.url>jdbc:h2:tcp://localhost/${project.basedir}/target/jbpm-test;MVCC=TRUE</maven.jdbc.url>
<maven.jdbc.url>jdbc:h2:tcp://localhost/${project.basedir}/target/jbpm-test;MODE=LEGACY;NON_KEYWORDS=VALUE</maven.jdbc.url>
<maven.jdbc.schema>public</maven.jdbc.schema>

</properties>
Expand Down

0 comments on commit 1c06445

Please sign in to comment.