This is an automated email from the ASF dual-hosted git repository.
pefernan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new 4029ff964 [incubator-kie-issues#2284] Fix JPA mappings for `jsonb`
columns in `kogito-addons-quarkus-data-index-persistence-jpa` (#2319)
4029ff964 is described below
commit 4029ff964795ddaa38839e18321a0f32ce17f3e4
Author: Pere Fernández <[email protected]>
AuthorDate: Thu Apr 16 09:33:58 2026 +0200
[incubator-kie-issues#2284] Fix JPA mappings for `jsonb` columns in
`kogito-addons-quarkus-data-index-persistence-jpa` (#2319)
* [incubator-kie-issues#2284] Fix JPA mappings for `jsonb` columns in
`kogito-addons-quarkus-data-index-persistence-jpa`
* - Excluding headers
---
.rat-excludes | 1 +
.../integration-tests-process/pom.xml | 9 ++++++
...ctJPAQuarkusAddonDataIndexPersistenceTest.java} | 16 +++--------
.../H2JPAQuarkusAddonDataIndexPersistenceTest.java | 31 +++++++++++++++++++++
.../data/index/it/H2QuarkusTestProfile.java | 30 ++++++++++++++++++++
...greSQLQuarkusAddonDataIndexPersistenceTest.java | 32 ++++++++++++++++++++++
.../index/it/PostgreSQLQuarkusTestProfile.java | 31 +++++++++++++++++++++
.../src/test/resources/application.properties | 6 ++++
.../src/main/resources/application.properties | 4 ++-
9 files changed, 147 insertions(+), 13 deletions(-)
diff --git a/.rat-excludes b/.rat-excludes
index eac98258b..08797b29e 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -34,6 +34,7 @@
data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-qua
data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/hello.bpmn
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
+data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/resources/application.properties
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/hello.bpmn
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/hello.bpmn
data-index/data-index-service/data-index-service-common/src/main/resources/domain.schema.graphqls
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
index c7a1958d7..49b5ef4de 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
@@ -63,6 +63,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-postgresql</artifactId>
+ </dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
@@ -83,6 +87,11 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-test-utils</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/AbstractJPAQuarku
[...]
similarity index 93%
rename from
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
rename to
data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/AbstractJPAQuarkusAddonDataIndexPersistenceTest.java
index 5c3e306d0..f7da4b255 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/AbstractJPAQuarkusAddonDataIndexPersistenceTest.java
@@ -26,9 +26,6 @@ import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.model.ProcessDefinitionKey;
import org.kie.kogito.index.model.ProcessInstance;
-import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.h2.H2DatabaseTestResource;
-import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
@@ -38,20 +35,16 @@ import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
-@QuarkusTest
-@QuarkusTestResource(H2DatabaseTestResource.class)
-class JPAQuarkusAddonDataIndexPersistenceTest {
+public abstract class AbstractJPAQuarkusAddonDataIndexPersistenceTest {
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
@Inject
ProcessDefinitionEntityStorage processDefinitionEntityStorage;
-
@Inject
ProcessInstanceEntityStorage processInstanceEntityStorage;
- static {
- RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
- }
-
@Test
void testDataIndexAddon() {
@@ -109,5 +102,4 @@ class JPAQuarkusAddonDataIndexPersistenceTest {
.hasFieldOrProperty("end")
.hasFieldOrProperty("lastUpdate");
}
-
}
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2JPAQuarkusAddonDataIndexPersistenceTest.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2JPAQuarkusAdd
[...]
new file mode 100644
index 000000000..fa1a73c9b
--- /dev/null
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2JPAQuarkusAddonDataIndexPersistenceTest.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.h2.H2DatabaseTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.TestProfile;
+
+@QuarkusTest
+@TestProfile(H2QuarkusTestProfile.class)
+@QuarkusTestResource(H2DatabaseTestResource.class)
+class H2JPAQuarkusAddonDataIndexPersistenceTest extends
AbstractJPAQuarkusAddonDataIndexPersistenceTest {
+
+}
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2QuarkusTestProfile.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2QuarkusTestProfile.java
new file mode 100644
index 000000000..7dd91989b
--- /dev/null
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/H2QuarkusTestProfile.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import io.quarkus.test.junit.QuarkusTestProfile;
+
+public class H2QuarkusTestProfile implements QuarkusTestProfile {
+
+ @Override
+ public String getConfigProfile() {
+ return "test-h2";
+ }
+}
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceTest.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQL
[...]
new file mode 100644
index 000000000..3b0aaf33b
--- /dev/null
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceTest.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import org.kie.kogito.testcontainers.quarkus.PostgreSqlQuarkusTestResource;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.TestProfile;
+
+@QuarkusTest
+@TestProfile(PostgreSQLQuarkusTestProfile.class)
+@QuarkusTestResource(value = PostgreSqlQuarkusTestResource.class,
restrictToAnnotatedClass = true)
+class PostgreSQLQuarkusAddonDataIndexPersistenceTest extends
AbstractJPAQuarkusAddonDataIndexPersistenceTest {
+
+}
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusTestProfile.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusTestProfile.java
new file mode 100644
index 000000000..68b377369
--- /dev/null
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusTestProfile.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import io.quarkus.test.junit.QuarkusTestProfile;
+
+public class PostgreSQLQuarkusTestProfile implements QuarkusTestProfile {
+
+ @Override
+ public String getConfigProfile() {
+ return "test-postgresql";
+ }
+
+}
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/resources/application.properties
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/resources/application.properties
new file mode 100644
index 000000000..40de785aa
--- /dev/null
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/resources/application.properties
@@ -0,0 +1,6 @@
+%test-postgresql.quarkus.datasource.db-kind=postgresql
+%test-postgresql.quarkus.datasource.devservices.enabled=false
+
+%test-h2.quarkus.datasource.db-kind=h2
+%test-h2.quarkus.datasource.username=kogito
+%test-h2.quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
index 5d15c7f83..e26e1b16c 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
@@ -22,4 +22,6 @@ kogito.apps.persistence.type=jdbc
#Hibernate
quarkus.hibernate-orm.jdbc.timezone=UTC
-quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
\ No newline at end of file
+quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+
+quarkus.datasource.jdbc.additional-jdbc-properties.stringtype=unspecified
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]