From e77dc639103e2f759cb70ae1c9352300ee97d66e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:06:01 +0200 Subject: [PATCH] Bump h2 from 1.4.197 to 2.2.220 (#285) (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump h2 from 1.4.197 to 2.2.220 * [bump h2-200] Override default datasource url --------- Co-authored-by: Toshiya Kobayashi Co-authored-by: Gonzalo Muñoz --- .../java/org/jbpm/process/workitem/camel/CamelSqlTest.java | 2 +- .../workitem/executesql/ExecuteSqlWorkItemHandlerTest.java | 4 ++-- .../src/test/resources/application-test-async.properties | 3 +++ .../src/test/resources/application-test.properties | 4 ++++ .../org/jbpm/process/workitem/jpa/JPAWorkItemHandlerTest.java | 4 ++-- pom.xml | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/camel-workitem/src/test/java/org/jbpm/process/workitem/camel/CamelSqlTest.java b/camel-workitem/src/test/java/org/jbpm/process/workitem/camel/CamelSqlTest.java index 778a6c610..2033d4e32 100644 --- a/camel-workitem/src/test/java/org/jbpm/process/workitem/camel/CamelSqlTest.java +++ b/camel-workitem/src/test/java/org/jbpm/process/workitem/camel/CamelSqlTest.java @@ -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(), diff --git a/execute-sql-workitem/src/test/java/org/jbpm/process/workitem/executesql/ExecuteSqlWorkItemHandlerTest.java b/execute-sql-workitem/src/test/java/org/jbpm/process/workitem/executesql/ExecuteSqlWorkItemHandlerTest.java index d604c7b5f..a1d6120c2 100644 --- a/execute-sql-workitem/src/test/java/org/jbpm/process/workitem/executesql/ExecuteSqlWorkItemHandlerTest.java +++ b/execute-sql-workitem/src/test/java/org/jbpm/process/workitem/executesql/ExecuteSqlWorkItemHandlerTest.java @@ -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"); @@ -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) { diff --git a/jbpm-workitem-itests/src/test/resources/application-test-async.properties b/jbpm-workitem-itests/src/test/resources/application-test-async.properties index b571222f0..2c4715782 100644 --- a/jbpm-workitem-itests/src/test/resources/application-test-async.properties +++ b/jbpm-workitem-itests/src/test/resources/application-test-async.properties @@ -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: diff --git a/jbpm-workitem-itests/src/test/resources/application-test.properties b/jbpm-workitem-itests/src/test/resources/application-test.properties index 2b3fa074a..605d0b8bc 100644 --- a/jbpm-workitem-itests/src/test/resources/application-test.properties +++ b/jbpm-workitem-itests/src/test/resources/application-test.properties @@ -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: diff --git a/jpa-workitem/src/test/java/org/jbpm/process/workitem/jpa/JPAWorkItemHandlerTest.java b/jpa-workitem/src/test/java/org/jbpm/process/workitem/jpa/JPAWorkItemHandlerTest.java index 10057c2e0..0cfe125ad 100644 --- a/jpa-workitem/src/test/java/org/jbpm/process/workitem/jpa/JPAWorkItemHandlerTest.java +++ b/jpa-workitem/src/test/java/org/jbpm/process/workitem/jpa/JPAWorkItemHandlerTest.java @@ -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"); @@ -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) { diff --git a/pom.xml b/pom.xml index cfda30e10..c5684b3d9 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ sa sasa - jdbc:h2:tcp://localhost/${project.basedir}/target/jbpm-test;MVCC=TRUE + jdbc:h2:tcp://localhost/${project.basedir}/target/jbpm-test;MODE=LEGACY;NON_KEYWORDS=VALUE public