diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
index a48a0eb3de..cc85884b7b 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
@@ -18,50 +18,30 @@
- org.testcontainers
- testcontainers
- ${version.org.testcontainers}
- compile
-
-
- org.junit.jupiter
- junit-jupiter-api
- compile
-
-
- io.rest-assured
- rest-assured
- compile
-
-
- io.rest-assured
- json-path
- compile
-
-
- org.assertj
- assertj-core
- compile
+ org.kie.kogito
+ data-index-test-utils
+ test
org.awaitility
awaitility
- compile
-
-
- org.kie.kogito
- kogito-test-utils
- compile
-
-
- org.mockito
- mockito-junit-jupiter
test
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
${jandex-maven-plugin.group-id}
jandex-maven-plugin
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
similarity index 100%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
rename to apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
index 68d9ffb830..b560b385e6 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
@@ -61,6 +61,29 @@
io.quarkus
quarkus-resteasy-jackson
+
+ org.kie.kogito
+ integration-tests-data-index-service-common
+ ${project.version}
+ test-jar
+ test
+
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
+ org.kie.kogito
+ data-index-common
+
+
+
+
+ org.awaitility
+ awaitility
+ test
+
org.kie.kogito
kogito-quarkus-test-utils
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
index eace1f98bc..8c7600f7bc 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
@@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public abstract class AbstractProcessDataIndexInfinispanIT extends AbstractProcessDataIndexIT {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
index 2fa691ad3d..e30506e897 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
@@ -22,7 +22,7 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
@QuarkusIntegrationTest
@TestProfile(InMemoryTestProfile.class)
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
index fa2c035785..da90def2db 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
@@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public abstract class AbstractProcessDataIndexMongoDBIT extends AbstractProcessDataIndexIT {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
index 316193e5b9..1476650eed 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
@@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public abstract class AbstractProcessDataIndexOracleIT extends AbstractProcessDataIndexIT {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
index 0177ea69bc..14a62f35e1 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
@@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public abstract class AbstractProcessDataIndexPostgreSqlIT extends AbstractProcessDataIndexIT {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
index 108ca99cf1..152aa4b9ef 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
@@ -20,6 +20,7 @@
import java.util.List;
import org.kie.kogito.index.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
+import org.kie.kogito.index.test.quarkus.DataIndexInMemoryQuarkusTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
deleted file mode 100644
index 0dbb0395ca..0000000000
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed 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.index.quarkus.http;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.kie.kogito.index.resources.http.DataIndexPostgreSqlHttpResource;
-
-public class DataIndexPostgreSqlHttpQuarkusTestResource extends AbstractDataIndexHttpQuarkusTestResource {
- public DataIndexPostgreSqlHttpQuarkusTestResource() {
- super(new DataIndexPostgreSqlHttpResource());
- }
-
- @Override
- protected Map getProperties() {
- Map properties = new HashMap<>();
- properties.putAll(getDataIndexConnectionProperties());
- properties.putAll(getTestResource().getProperties());
- return properties;
- }
-
-}
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
index 6767e48686..808b0d9f2f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.http.DataIndexInfinispanHttpQuarkusTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class InfinispanHttpTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
index 7573403815..2902585f90 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
@@ -18,10 +18,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource;
+import org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
+import static org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
public class KogitoServiceRandomPortQuarkusHttpTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
index eec462c898..478211d231 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.http.DataIndexMongoDBHttpQuarkusTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class MongoDBHttpTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
index c6b0df61fe..58674b31ab 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.http.DataIndexOracleHttpQuarkusTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class OracleHttpTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
index 7b38b3e452..8da0393cff 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class PostgreSqlHttpTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
index c64da175e4..2ad4df5b1a 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexInfinispanQuarkusKafkaTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class InfinispanKafkaTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
index 41f4661a30..6165b9d458 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
@@ -18,10 +18,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource;
+import org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
+import static org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
public class KogitoServiceRandomPortQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
index a9f7f5964c..36e307f944 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexMongoDBQuarkusKafkaTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class MongoDBKafkaTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
index 147a24a9ad..a8f3ba1d45 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexOracleQuarkusKafkaTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class OracleKafkaTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
index fae3ec4195..b6b2d7531b 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
@@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexPostgreSqlQuarkusKafkaTestResource;
+
import io.quarkus.test.junit.QuarkusTestProfile;
public class PostgreSqlKafkaTestProfile implements QuarkusTestProfile {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
index 779d00fa33..44a8edd1cd 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
@@ -37,11 +37,6 @@
org.kie.kogito
integration-tests-data-index-service-common
-
- io.rest-assured
- rest-assured
- test
-
org.kie.kogito
kogito-addons-springboot-events-process-kafka
@@ -62,6 +57,38 @@
org.kie.kogito
kogito-addons-springboot-persistence-filesystem
+
+ io.rest-assured
+ rest-assured
+ test
+
+
+ org.kie.kogito
+ integration-tests-data-index-service-common
+ ${project.version}
+ test-jar
+ test
+
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
+ org.kie.kogito
+ data-index-common
+
+
+ org.kie.kogito
+ kogito-quarkus-test-utils
+
+
+
+
+ org.awaitility
+ awaitility
+ test
+
org.postgresql
postgresql
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
index 1d94ec968c..0a51b94fad 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
@@ -27,7 +27,7 @@
import io.restassured.RestAssured;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexInfinispanSpringTestResource.class })
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
index 59c09494ec..a7308ac7bd 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
@@ -27,7 +27,7 @@
import io.restassured.RestAssured;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexMongoDBSpringTestResource.class })
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
index bcb7bcaf8b..8c6ef976a0 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
@@ -27,7 +27,7 @@
import io.restassured.RestAssured;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexOracleSpringTestResource.class })
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
index 0997ab6720..d514f13d01 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
@@ -27,7 +27,7 @@
import io.restassured.RestAssured;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexPostgreSqlSpringTestResource.class })
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
index 2c12e914f7..d1301e5374 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
@@ -19,10 +19,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexInfinispanKafkaResource;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexInfinispanKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexInfinispanSpringTestResource extends ConditionalSpringBootTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
index 4ae001db27..ce22c550f0 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
@@ -19,10 +19,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexMongoDBKafkaResource;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexMongoDBKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexMongoDBSpringTestResource extends ConditionalSpringBootTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
index d9cf9ffc07..c96fc04c73 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
@@ -19,10 +19,10 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexOracleKafkaResource;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexOracleKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexOracleSpringTestResource extends ConditionalSpringBootTestResource {
public DataIndexOracleSpringTestResource() {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
index 602bc3730b..39d82bfbc2 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
@@ -19,16 +19,23 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexPostgreSqlKafkaResource;
+import org.kie.kogito.index.test.quarkus.kafka.DataIndexPostgreSqlKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;
+import org.springframework.context.ConfigurableApplicationContext;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexPostgreSqlSpringTestResource extends ConditionalSpringBootTestResource {
public DataIndexPostgreSqlSpringTestResource() {
super(new DataIndexPostgreSqlKafkaResource());
}
+ @Override
+ public void initialize(ConfigurableApplicationContext applicationContext) {
+ getTestResource().getDataIndex().migrateDB();
+ super.initialize(applicationContext);
+ }
+
@Override
protected Map getProperties() {
Map properties = new HashMap<>();
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
index ef3b6c193c..59e6202539 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
@@ -17,7 +17,7 @@
import java.util.Map;
-import org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource;
+import org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;
import static java.util.Collections.singletonMap;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/pom.xml
index e492944368..013d72c2b9 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/pom.xml
@@ -23,8 +23,13 @@
org.kie.kogito
- integration-tests-data-index-service-common
- ${project.version}
+ data-index-test-utils
+
+
+ org.kie.kogito
+ data-index-common
+
+
org.kie.kogito
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
index d4d7a6ba33..881b00b9bb 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
@@ -18,7 +18,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexPostgreSqlContainer;
+import org.kie.kogito.index.test.containers.DataIndexPostgreSqlContainer;
import org.kie.kogito.testcontainers.JobServiceContainer;
import org.kie.kogito.testcontainers.KogitoKafkaContainer;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
diff --git a/data-index/data-index-common/pom.xml b/data-index/data-index-common/pom.xml
index 6a52279bf0..b744de0205 100644
--- a/data-index/data-index-common/pom.xml
+++ b/data-index/data-index-common/pom.xml
@@ -23,24 +23,12 @@
io.quarkus
- quarkus-vertx-graphql
-
-
- io.quarkus
- quarkus-vertx
-
-
- io.quarkus
- quarkus-reactive-routes
+ quarkus-jackson
com.google.guava
guava
-
- com.graphql-java
- graphql-java-extended-scalars
-
io.quarkus
quarkus-junit5
@@ -60,17 +48,6 @@
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- test-jar
-
-
-
-
${jandex-maven-plugin.group-id}
jandex-maven-plugin
diff --git a/data-index/data-index-graphql/pom.xml b/data-index/data-index-graphql/pom.xml
new file mode 100644
index 0000000000..797ebdaf95
--- /dev/null
+++ b/data-index/data-index-graphql/pom.xml
@@ -0,0 +1,66 @@
+
+
+
+ data-index
+ org.kie.kogito
+ 2.0.0-SNAPSHOT
+
+ 4.0.0
+
+ data-index-graphql
+ Kogito Apps :: Data Index GraphQL
+
+
+
+ org.kie.kogito
+ data-index-common
+
+
+ io.quarkus
+ quarkus-vertx-graphql
+
+
+ io.quarkus
+ quarkus-reactive-routes
+
+
+ com.graphql-java
+ graphql-java-extended-scalars
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
+
+ org.assertj
+ assertj-core
+ test
+
+
+ org.mockito
+ mockito-junit-jupiter
+ test
+
+
+
+
+
+
+ ${jandex-maven-plugin.group-id}
+ jandex-maven-plugin
+
+
+ make-index
+
+ jandex
+
+
+
+
+
+
+
+
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
similarity index 100%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
rename to data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
diff --git a/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml b/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/data-index/data-index-common/src/main/resources/basic.schema.graphqls b/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
similarity index 100%
rename from data-index/data-index-common/src/main/resources/basic.schema.graphqls
rename to data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
similarity index 100%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
rename to data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
similarity index 100%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
rename to data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
similarity index 100%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
rename to data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
similarity index 100%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
rename to data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
diff --git a/data-index/data-index-service/data-index-service-common/pom.xml b/data-index/data-index-service/data-index-service-common/pom.xml
index 144a0fa16c..4dfc464462 100644
--- a/data-index/data-index-service/data-index-service-common/pom.xml
+++ b/data-index/data-index-service/data-index-service-common/pom.xml
@@ -23,7 +23,7 @@
org.kie.kogito
- data-index-common
+ data-index-graphql
org.kie.kogito
@@ -89,8 +89,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ProcessInstanceMetaMapper.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
similarity index 98%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ProcessInstanceMetaMapper.java
rename to data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
index c4aa5eba41..2a979d791a 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ProcessInstanceMetaMapper.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.json;
+package org.kie.kogito.index.service.json;
import java.util.function.Function;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapper.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
similarity index 99%
rename from data-index/data-index-common/src/main/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapper.java
rename to data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
index cab20d0510..c9ca890c90 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapper.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.json;
+package org.kie.kogito.index.service.json;
import java.util.Set;
import java.util.function.Function;
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
index 99282e0b8e..16be6bcffe 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
@@ -24,9 +24,9 @@
import org.kie.kogito.event.DataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.index.json.ProcessInstanceMetaMapper;
-import org.kie.kogito.index.json.UserTaskInstanceMetaMapper;
import org.kie.kogito.index.service.IndexingService;
+import org.kie.kogito.index.service.json.ProcessInstanceMetaMapper;
+import org.kie.kogito.index.service.json.UserTaskInstanceMetaMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
index 03b26e573c..20fcc7b6f0 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
@@ -29,7 +29,7 @@
import org.junit.jupiter.api.Test;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.index.TestUtils;
+import org.kie.kogito.index.test.TestUtils;
import org.kie.kogito.persistence.protobuf.ProtobufService;
import io.restassured.http.ContentType;
@@ -44,9 +44,6 @@
import static org.hamcrest.CoreMatchers.nullValue;
import static org.kie.kogito.index.DateTimeUtils.formatDateTime;
import static org.kie.kogito.index.DateTimeUtils.formatOffsetDateTime;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessInstanceVariablesMap;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
import static org.kie.kogito.index.model.ProcessInstanceState.ERROR;
@@ -61,6 +58,9 @@
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceById;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndActualOwner;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdNoActualOwner;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessInstanceVariablesMap;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractDomainIndexingServiceIT extends AbstractIndexingServiceIT {
@@ -125,7 +125,8 @@ void testAddProtoFileMissingModelType() {
}
}
- @Test //Reproducer for KOGITO-7690
+ @Test
+ //Reproducer for KOGITO-7690
void testProtoWithoutSortingAttribute() throws Exception {
String proto = TestUtils.readFileContent("books.proto");
protobufService.registerProtoBufferType(proto);
@@ -135,7 +136,8 @@ void testProtoWithoutSortingAttribute() throws Exception {
.then().log().ifValidationFails().statusCode(200).body("data.Books", isA(Collection.class));
}
- @Test //Reproducer for KOGITO-172
+ @Test
+ //Reproducer for KOGITO-172
void testAddProtoFileTwice() throws Exception {
protobufService.registerProtoBufferType(getProtoBufferFileV1());
given().contentType(ContentType.JSON)
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
index c911150057..9128d8050c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
@@ -53,10 +53,6 @@
import static org.kie.kogito.index.DateTimeUtils.formatDateTime;
import static org.kie.kogito.index.DateTimeUtils.formatOffsetDateTime;
import static org.kie.kogito.index.DateTimeUtils.formatZonedDateTime;
-import static org.kie.kogito.index.TestUtils.getJobCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessInstanceVariablesMap;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
import static org.kie.kogito.index.model.ProcessInstanceState.ERROR;
@@ -84,6 +80,10 @@
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndStarted;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndState;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdNoActualOwner;
+import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessInstanceVariablesMap;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractIndexingServiceIT extends AbstractIndexingIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
index 6907d6ac85..565d9b6dfc 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
@@ -26,11 +26,11 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
import org.kie.kogito.index.service.DataIndexServiceException;
+import org.kie.kogito.index.test.TestUtils;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
index 9de6ee4c12..7c093ac1f7 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
@@ -31,9 +31,9 @@
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.kie.kogito.index.TestUtils.getProcessInstance;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
+import static org.kie.kogito.index.test.TestUtils.getProcessInstance;
import static org.kie.kogito.persistence.api.query.QueryFilterFactory.between;
import static org.kie.kogito.persistence.api.query.QueryFilterFactory.contains;
import static org.kie.kogito.persistence.api.query.QueryFilterFactory.containsAll;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
index 76381f680f..4dc6710ae0 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
@@ -29,7 +29,7 @@
import org.kie.kogito.persistence.api.Storage;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.kie.kogito.index.TestUtils.getProcessInstance;
+import static org.kie.kogito.index.test.TestUtils.getProcessInstance;
public abstract class AbstractStorageIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
index 5ea7277153..b267c85d6d 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
@@ -28,11 +28,11 @@
import org.junit.jupiter.api.Test;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.service.AbstractIndexingIT;
import org.kie.kogito.index.storage.DataIndexStorageService;
+import org.kie.kogito.index.test.TestUtils;
import org.kie.kogito.persistence.protobuf.ProtobufService;
import io.restassured.http.ContentType;
@@ -55,9 +55,9 @@
import static java.lang.String.format;
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static org.hamcrest.CoreMatchers.isA;
-import static org.kie.kogito.index.TestUtils.getJobCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractWebSocketSubscriptionIT extends AbstractIndexingIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
index 95af0e64b0..ad05ddf7af 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
@@ -41,14 +41,14 @@
import static io.restassured.RestAssured.given;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.kie.kogito.index.TestUtils.getJob;
-import static org.kie.kogito.index.TestUtils.getJobCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getProcessInstance;
-import static org.kie.kogito.index.TestUtils.getTaskAttachment;
-import static org.kie.kogito.index.TestUtils.getTaskComment;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
+import static org.kie.kogito.index.test.TestUtils.getJob;
+import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessInstance;
+import static org.kie.kogito.index.test.TestUtils.getTaskAttachment;
+import static org.kie.kogito.index.test.TestUtils.getTaskComment;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/json/ProcessInstanceMetaMapperTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
similarity index 98%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/json/ProcessInstanceMetaMapperTest.java
rename to data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
index dcdf81a31a..ee507c9a85 100644
--- a/data-index/data-index-common/src/test/java/org/kie/kogito/index/json/ProcessInstanceMetaMapperTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.json;
+package org.kie.kogito.index.service.json;
import java.util.UUID;
@@ -25,9 +25,9 @@
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
import static org.kie.kogito.index.storage.Constants.KOGITO_DOMAIN_ATTRIBUTE;
import static org.kie.kogito.index.storage.Constants.PROCESS_INSTANCES_DOMAIN_ATTRIBUTE;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
public class ProcessInstanceMetaMapperTest {
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapperTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
similarity index 97%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapperTest.java
rename to data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
index bc29f25430..6ccc6ecd0d 100644
--- a/data-index/data-index-common/src/test/java/org/kie/kogito/index/json/UserTaskInstanceMetaMapperTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.json;
+package org.kie.kogito.index.service.json;
import java.util.UUID;
@@ -24,9 +24,9 @@
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.storage.Constants.KOGITO_DOMAIN_ATTRIBUTE;
import static org.kie.kogito.index.storage.Constants.USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public class UserTaskInstanceMetaMapperTest {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
index b28e550146..f80c8c2cf2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
@@ -25,10 +25,10 @@
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractDomainMessagingHttpConsumerIT extends AbstractDomainMessagingConsumerIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
index a4970676a7..e31296898c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
@@ -22,7 +22,7 @@
import org.kie.kogito.test.quarkus.kafka.KafkaTestClient;
import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;
-import static org.kie.kogito.index.TestUtils.readFileContent;
+import static org.kie.kogito.index.test.TestUtils.readFileContent;
public abstract class AbstractDomainMessagingKafkaConsumerIT extends AbstractDomainMessagingConsumerIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
index 5acf897b25..baeeeb9a51 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
@@ -26,8 +26,8 @@
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
-import static org.kie.kogito.index.TestUtils.*;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.*;
+import static org.kie.kogito.index.test.TestUtils.*;
public abstract class AbstractMessagingHttpConsumerIT extends AbstractMessagingConsumerIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
index 61be5f5362..4307b94db2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
@@ -22,7 +22,7 @@
import org.kie.kogito.test.quarkus.kafka.KafkaTestClient;
import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;
-import static org.kie.kogito.index.TestUtils.readFileContent;
+import static org.kie.kogito.index.test.TestUtils.readFileContent;
public abstract class AbstractMessagingKafkaConsumerIT extends AbstractMessagingConsumerIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
index b63a883d0f..c567bc0a5c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
@@ -45,14 +45,14 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.isA;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceById;
import static org.kie.kogito.index.service.GraphQLUtils.getTravelsByProcessInstanceId;
import static org.kie.kogito.index.service.GraphQLUtils.getTravelsByUserTaskId;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByProcessInstanceId;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractMessagingLoadKafkaIT {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
index 6b9346b7c9..4d4dfd42d7 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
@@ -34,8 +34,8 @@
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
index 60ea5dc856..174ea1cbfa 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
@@ -41,7 +41,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
-import static org.kie.kogito.index.TestUtils.readFileContent;
+import static org.kie.kogito.index.test.TestUtils.readFileContent;
import static org.mockito.Mockito.lenient;
@ExtendWith(MockitoExtension.class)
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
index 9796b85019..d2592c9b4b 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
@@ -34,8 +34,8 @@
import io.smallrye.mutiny.helpers.test.UniAssertSubscriber;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.TestUtils.getUserTaskCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
diff --git a/data-index/data-index-service/data-index-service-infinispan/pom.xml b/data-index/data-index-service/data-index-service-infinispan/pom.xml
index 6439fea3b7..f57a46dc84 100644
--- a/data-index/data-index-service/data-index-service-infinispan/pom.xml
+++ b/data-index/data-index-service/data-index-service-infinispan/pom.xml
@@ -32,8 +32,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
index 4de343ce25..d055ca5ae2 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
index e2b97c966c..8f122a1111 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
index f20619f595..8792aa0f65 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql.query;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
index 661f410c56..97d83b2b90 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql.query;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
index 0c89dc99ad..90a96a20e4 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.messaging;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
index 07184561e9..e3e86f4ae9 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.messaging;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
index 842644ccae..30525353bf 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
@@ -17,8 +17,8 @@
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-inmemory/pom.xml b/data-index/data-index-service/data-index-service-inmemory/pom.xml
index 632c66bf15..6e6d19354b 100644
--- a/data-index/data-index-service/data-index-service-inmemory/pom.xml
+++ b/data-index/data-index-service/data-index-service-inmemory/pom.xml
@@ -32,8 +32,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-service/data-index-service-mongodb/pom.xml b/data-index/data-index-service/data-index-service-mongodb/pom.xml
index f387d5d830..d48156e46b 100644
--- a/data-index/data-index-service/data-index-service-mongodb/pom.xml
+++ b/data-index/data-index-service/data-index-service-mongodb/pom.xml
@@ -32,8 +32,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
index cf80558b12..f1f4a3baf0 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
index 60c7f0a7cb..14806cf8a2 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
index 21a8df6a02..7f0a9af85d 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql.query;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
index a565e1e8c3..d6efd5ef9a 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.graphql.query;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
index fc1ac3daf8..ce4acd52e0 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.messaging;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
index 4a30ceeff5..6b242dcbad 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
@@ -16,8 +16,8 @@
package org.kie.kogito.index.service.messaging;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
index 629c60e50a..07a0febd17 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
@@ -17,8 +17,8 @@
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
-import org.kie.kogito.index.TestUtils;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
+import org.kie.kogito.index.test.TestUtils;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
diff --git a/data-index/data-index-service/data-index-service-oracle/pom.xml b/data-index/data-index-service/data-index-service-oracle/pom.xml
index 3be9e11fcb..3d62a9f49d 100644
--- a/data-index/data-index-service/data-index-service-oracle/pom.xml
+++ b/data-index/data-index-service/data-index-service-oracle/pom.xml
@@ -36,8 +36,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-service/data-index-service-postgresql/pom.xml b/data-index/data-index-service/data-index-service-postgresql/pom.xml
index 4ce0cf4988..8aaa2949fd 100644
--- a/data-index/data-index-service/data-index-service-postgresql/pom.xml
+++ b/data-index/data-index-service/data-index-service-postgresql/pom.xml
@@ -36,8 +36,7 @@
org.kie.kogito
- data-index-common
- test-jar
+ data-index-test-utils
test
diff --git a/data-index/data-index-test-utils/pom.xml b/data-index/data-index-test-utils/pom.xml
new file mode 100644
index 0000000000..caec8a78c7
--- /dev/null
+++ b/data-index/data-index-test-utils/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+ data-index
+ org.kie.kogito
+ 2.0.0-SNAPSHOT
+
+ 4.0.0
+
+ data-index-test-utils
+ Kogito Apps :: Data Index Test Utils
+
+
+
+ org.kie.kogito
+ data-index-common
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.kie.kogito
+ kogito-quarkus-test-utils
+
+
+ org.testcontainers
+ testcontainers
+ ${version.org.testcontainers}
+
+
+
+
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/Constants.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/Constants.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
index b15775acfa..3cc6a0dbae 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/Constants.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index;
+package org.kie.kogito.index.test;
public class Constants {
private Constants() {
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/TestUtils.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
similarity index 98%
rename from data-index/data-index-common/src/test/java/org/kie/kogito/index/TestUtils.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
index b98819762e..7a4733ea32 100644
--- a/data-index/data-index-common/src/test/java/org/kie/kogito/index/TestUtils.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index;
+package org.kie.kogito.index.test;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
@@ -57,7 +57,6 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import static com.google.common.collect.Lists.newArrayList;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singleton;
import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
@@ -91,7 +90,7 @@ public static String readFileContent(String file) throws IOException {
buf.write((byte) result);
result = bis.read();
}
- return buf.toString(StandardCharsets.UTF_8.name());
+ return buf.toString(StandardCharsets.UTF_8);
}
}
@@ -166,11 +165,11 @@ private static List getNodeInstances(Integer status) {
ni.setNodeId("1");
ni.setDefinitionId("StartEvent_1");
ni.setExit(status == ProcessInstanceState.COMPLETED.ordinal() ? ZonedDateTime.now().plus(1, ChronoUnit.HOURS) : null);
- return newArrayList(ni);
+ return List.of(ni);
}
private static List getMilestones() {
- return newArrayList(
+ return List.of(
Milestone.builder()
.id(MILESTONE_ID)
.name("SimpleMilestone")
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/AbstractDataIndexContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
similarity index 97%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/AbstractDataIndexContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
index 7a8f40f298..8f2a20e666 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/AbstractDataIndexContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
import java.io.File;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInMemoryContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInMemoryContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
index 94ec7cc082..a1d11cb2ec 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInMemoryContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
/**
* This container wraps Data Index Service container
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInfinispanContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
similarity index 96%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInfinispanContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
index e07bff048a..468e181040 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexInfinispanContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
/**
* This container wraps Data Index Service container
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexMongoDBContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexMongoDBContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
index 5fd7e15093..6e169dca9c 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexMongoDBContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
/**
* This container wraps Data Index Service container
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexOracleContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
similarity index 96%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexOracleContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
index 37ab12eb42..28435bc7f7 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexOracleContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
/**
* This container wraps Data Index Service container
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexPostgreSqlContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
similarity index 90%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexPostgreSqlContainer.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
index 724202b725..04d8efc586 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/DataIndexPostgreSqlContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
/**
* This container wraps Data Index Service container
@@ -30,8 +30,12 @@ public void setPostgreSqlURL(String postgreSqlURL, String username, String passw
addEnv("QUARKUS_DATASOURCE_JDBC_URL", postgreSqlURL);
addEnv("QUARKUS_DATASOURCE_USERNAME", username);
addEnv("QUARKUS_DATASOURCE_PASSWORD", password);
+ }
+
+ public void migrateDB() {
addEnv("QUARKUS_FLYWAY_MIGRATE_AT_START", "true");
addEnv("QUARKUS_FLYWAY_BASELINE_ON_MIGRATE", "true");
+ addEnv("QUARKUS_FLYWAY_TABLE", "data-index-flyway");
}
@Override
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/KogitoKafkaContainerWithoutBridge.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/KogitoKafkaContainerWithoutBridge.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
index f39086f0f2..c304c65ee4 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/testcontainers/KogitoKafkaContainerWithoutBridge.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.testcontainers;
+package org.kie.kogito.index.test.containers;
import org.kie.kogito.testcontainers.KogitoKafkaContainer;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/DataIndexInMemoryQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
similarity index 92%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/DataIndexInMemoryQuarkusTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
index bd2fbedc6b..9bc75a8335 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/DataIndexInMemoryQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus;
+package org.kie.kogito.index.test.quarkus;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.DataIndexInMemoryResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexInMemoryQuarkusTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/DataIndexInMemoryResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
similarity index 94%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/DataIndexInMemoryResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
index cd64c4cb49..1ce9387d4d 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/DataIndexInMemoryResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources;
+package org.kie.kogito.index.test.quarkus;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexInMemoryContainer;
+import org.kie.kogito.index.test.containers.DataIndexInMemoryContainer;
import org.kie.kogito.test.resources.TestResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/KogitoServiceRandomPortTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
similarity index 97%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/KogitoServiceRandomPortTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
index 80145e623e..77c03bd5dd 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/KogitoServiceRandomPortTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.kie.kogito.index.resources;
+package org.kie.kogito.index.test.quarkus;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.test.utils.SocketUtils;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
similarity index 94%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
index 5ee80c643e..100084dfa4 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
@@ -23,7 +23,7 @@
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
import org.kie.kogito.test.resources.TestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public abstract class AbstractDataIndexHttpQuarkusTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
similarity index 91%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
index 63331b97a5..f7955a3b33 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.http.DataIndexInfinispanHttpResource;
-
public class DataIndexInfinispanHttpQuarkusTestResource extends AbstractDataIndexHttpQuarkusTestResource {
public DataIndexInfinispanHttpQuarkusTestResource() {
super(new DataIndexInfinispanHttpResource());
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexInfinispanHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexInfinispanHttpResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
index e204483292..df98d8a12b 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexInfinispanHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexInfinispanContainer;
+import org.kie.kogito.index.test.containers.DataIndexInfinispanContainer;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoInfinispanContainer;
import org.slf4j.Logger;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
similarity index 91%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
index 000d1aa940..9aa30d4775 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.http.DataIndexMongoDBHttpResource;
-
public class DataIndexMongoDBHttpQuarkusTestResource extends AbstractDataIndexHttpQuarkusTestResource {
public DataIndexMongoDBHttpQuarkusTestResource() {
super(new DataIndexMongoDBHttpResource());
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexMongoDBHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexMongoDBHttpResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
index be895a3707..9b01354a9d 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexMongoDBHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexMongoDBContainer;
+import org.kie.kogito.index.test.containers.DataIndexMongoDBContainer;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoMongoDBContainer;
import org.slf4j.Logger;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
similarity index 91%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
index 99da39b5cc..6d91bf6fd4 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.http.DataIndexOracleHttpResource;
-
public class DataIndexOracleHttpQuarkusTestResource extends AbstractDataIndexHttpQuarkusTestResource {
public DataIndexOracleHttpQuarkusTestResource() {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexOracleHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
similarity index 95%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexOracleHttpResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
index d1d10fa094..af3e077a2c 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexOracleHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexOracleContainer;
+import org.kie.kogito.index.test.containers.DataIndexOracleContainer;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoOracleSqlContainer;
import org.slf4j.Logger;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
new file mode 100644
index 0000000000..392d45a170
--- /dev/null
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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.index.test.quarkus.http;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class DataIndexPostgreSqlHttpQuarkusTestResource extends AbstractDataIndexHttpQuarkusTestResource {
+
+ public static final String QUARKUS_DATASOURCE_JDBC_URL = "quarkus.datasource.jdbc.url";
+ public static final String QUARKUS_DATASOURCE_USERNAME = "quarkus.datasource.username";
+ public static final String QUARKUS_DATASOURCE_PASSWORD = "quarkus.datasource.password";
+ public static final String DATA_INDEX_MIGRATE_DB = "kogito.data-index.migrate.db";
+
+ private Boolean migrateDb = true;
+
+ public DataIndexPostgreSqlHttpQuarkusTestResource() {
+ super(new DataIndexPostgreSqlHttpResource());
+ }
+
+ @Override
+ public Map start() {
+ if (migrateDb) {
+ getTestResource().getDataIndex().migrateDB();
+ }
+ return super.start();
+ }
+
+ @Override
+ public void init(Map initArgs) {
+ if (initArgs.containsKey(DATA_INDEX_MIGRATE_DB)) {
+ migrateDb = Boolean.valueOf(initArgs.getOrDefault(DATA_INDEX_MIGRATE_DB, "true"));
+ }
+ }
+
+ @Override
+ protected Map getProperties() {
+ Map properties = new HashMap<>(getDataIndexConnectionProperties());
+ properties.put(QUARKUS_DATASOURCE_JDBC_URL, getTestResource().getPostgresql().getJdbcUrl());
+ properties.put(QUARKUS_DATASOURCE_USERNAME, getTestResource().getPostgresql().getUsername());
+ properties.put(QUARKUS_DATASOURCE_PASSWORD, getTestResource().getPostgresql().getPassword());
+ return properties;
+ }
+
+}
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexPostgreSqlHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
similarity index 82%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexPostgreSqlHttpResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
index a355f99c4f..aa744f387f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/http/DataIndexPostgreSqlHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
@@ -14,12 +14,9 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.http;
+package org.kie.kogito.index.test.quarkus.http;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.kie.kogito.index.testcontainers.DataIndexPostgreSqlContainer;
+import org.kie.kogito.index.test.containers.DataIndexPostgreSqlContainer;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.slf4j.Logger;
@@ -31,9 +28,8 @@ public class DataIndexPostgreSqlHttpResource implements TestResource {
private static final Logger LOGGER = LoggerFactory.getLogger(DataIndexPostgreSqlHttpResource.class);
- KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer();
- DataIndexPostgreSqlContainer dataIndex = new DataIndexPostgreSqlContainer();
- Map properties = new HashMap<>();
+ private KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer();
+ private DataIndexPostgreSqlContainer dataIndex = new DataIndexPostgreSqlContainer();
@Override
public String getResourceName() {
@@ -43,7 +39,6 @@ public String getResourceName() {
@Override
public void start() {
LOGGER.debug("Starting PostgreSQL Quarkus test resource");
- properties.clear();
Network network = Network.newNetwork();
postgresql.withNetwork(network);
postgresql.withNetworkAliases("postgresql");
@@ -72,7 +67,11 @@ public int getMappedPort() {
return dataIndex.getMappedPort();
}
- public Map getProperties() {
- return properties;
+ public KogitoPostgreSqlContainer getPostgresql() {
+ return postgresql;
+ }
+
+ public DataIndexPostgreSqlContainer getDataIndex() {
+ return dataIndex;
}
}
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexInfinispanKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
similarity index 93%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexInfinispanKafkaResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
index a296a455f8..7dce8d199c 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexInfinispanKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexInfinispanContainer;
-import org.kie.kogito.index.testcontainers.KogitoKafkaContainerWithoutBridge;
+import org.kie.kogito.index.test.containers.DataIndexInfinispanContainer;
+import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoInfinispanContainer;
import org.slf4j.Logger;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
similarity index 87%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
index cf9966eabc..1f0aea80b1 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexInfinispanKafkaResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexInfinispanQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexMongoDBKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
similarity index 93%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexMongoDBKafkaResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
index 755192448b..3099861601 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexMongoDBKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexMongoDBContainer;
-import org.kie.kogito.index.testcontainers.KogitoKafkaContainerWithoutBridge;
+import org.kie.kogito.index.test.containers.DataIndexMongoDBContainer;
+import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoMongoDBContainer;
import org.slf4j.Logger;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
similarity index 87%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
index 6c8520ac55..bfd0491512 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexMongoDBKafkaResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexMongoDBQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexOracleKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
similarity index 93%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexOracleKafkaResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
index 18e614a1b7..78ce2f9673 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexOracleKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexOracleContainer;
-import org.kie.kogito.index.testcontainers.KogitoKafkaContainerWithoutBridge;
+import org.kie.kogito.index.test.containers.DataIndexOracleContainer;
+import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoOracleSqlContainer;
import org.slf4j.Logger;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
similarity index 87%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
index 5c29100f0e..08b08b53c6 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
@@ -14,15 +14,14 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexOracleKafkaResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexOracleQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {
public DataIndexOracleQuarkusKafkaTestResource() {
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexPostgreSqlKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
similarity index 81%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexPostgreSqlKafkaResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
index 8f0c4601d2..a436135a59 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/resources/kafka/DataIndexPostgreSqlKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package org.kie.kogito.index.resources.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.testcontainers.DataIndexPostgreSqlContainer;
-import org.kie.kogito.index.testcontainers.KogitoKafkaContainerWithoutBridge;
+import org.kie.kogito.index.test.containers.DataIndexPostgreSqlContainer;
+import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.slf4j.Logger;
@@ -32,10 +32,10 @@ public class DataIndexPostgreSqlKafkaResource implements TestResource {
private static final Logger LOGGER = LoggerFactory.getLogger(DataIndexPostgreSqlKafkaResource.class);
- KogitoKafkaContainerWithoutBridge kafka = new KogitoKafkaContainerWithoutBridge();
- KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer();
- DataIndexPostgreSqlContainer dataIndex = new DataIndexPostgreSqlContainer();
- Map properties = new HashMap<>();
+ private KogitoKafkaContainerWithoutBridge kafka = new KogitoKafkaContainerWithoutBridge();
+ private KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer();
+ private DataIndexPostgreSqlContainer dataIndex = new DataIndexPostgreSqlContainer();
+ private Map properties = new HashMap<>();
@Override
public String getResourceName() {
@@ -86,4 +86,8 @@ public int getMappedPort() {
public Map getProperties() {
return properties;
}
+
+ public DataIndexPostgreSqlContainer getDataIndex() {
+ return dataIndex;
+ }
}
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
similarity index 82%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
index 4078141ccf..1a3c810a01 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
@@ -14,21 +14,26 @@
* limitations under the License.
*/
-package org.kie.kogito.index.quarkus.kafka;
+package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
import java.util.Map;
-import org.kie.kogito.index.resources.kafka.DataIndexPostgreSqlKafkaResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;
-import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
public class DataIndexPostgreSqlQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {
public DataIndexPostgreSqlQuarkusKafkaTestResource() {
super(new DataIndexPostgreSqlKafkaResource());
}
+ @Override
+ public void init(Map initArgs) {
+ getTestResource().getDataIndex().migrateDB();
+ super.init(initArgs);
+ }
+
@Override
protected Map getProperties() {
Map properties = new HashMap<>();
diff --git a/data-index/data-index-common/src/test/resources/deals.proto b/data-index/data-index-test-utils/src/main/resources/deals.proto
similarity index 100%
rename from data-index/data-index-common/src/test/resources/deals.proto
rename to data-index/data-index-test-utils/src/main/resources/deals.proto
diff --git a/data-index/data-index-common/src/test/resources/travels.proto b/data-index/data-index-test-utils/src/main/resources/travels.proto
similarity index 100%
rename from data-index/data-index-common/src/test/resources/travels.proto
rename to data-index/data-index-test-utils/src/main/resources/travels.proto
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml
new file mode 100644
index 0000000000..0c5e612a37
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml
@@ -0,0 +1,30 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-common-deployment
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence Common :: Deployment
+
+
+ io.quarkus
+ quarkus-arc-deployment
+
+
+ io.quarkus
+ quarkus-jackson-deployment
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-common-deployment
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-runtime
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java
new file mode 100644
index 0000000000..e97362bb5f
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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.persistence.deployment;
+
+import org.kie.kogito.quarkus.addons.common.deployment.KogitoCapability;
+import org.kie.kogito.quarkus.addons.common.deployment.OneOfCapabilityKogitoAddOnProcessor;
+
+public abstract class AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor extends OneOfCapabilityKogitoAddOnProcessor {
+
+ AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor() {
+ super(KogitoCapability.SERVERLESS_WORKFLOW, KogitoCapability.PROCESSES);
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml
new file mode 100644
index 0000000000..1d22996002
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-common-parent
+ pom
+
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence Common
+
+
+ deployment
+ runtime
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
new file mode 100644
index 0000000000..aac7357a84
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
@@ -0,0 +1,59 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-common-runtime
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence Common :: Runtime
+
+
+ io.quarkus
+ quarkus-arc
+
+
+ org.kie.kogito
+ data-index-common
+
+
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
+ org.assertj
+ assertj-core
+ test
+
+
+ org.mockito
+ mockito-junit-jupiter
+ test
+
+
+
+
+
+ ${jandex-maven-plugin.group-id}
+ jandex-maven-plugin
+
+
+ maven-compiler-plugin
+
+
+
+ io.quarkus
+ quarkus-extension-processor
+ ${version.io.quarkus}
+
+
+
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
similarity index 100%
rename from data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
rename to data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
similarity index 95%
rename from data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
rename to data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
index c5061a1db9..687e7a0d7a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
@@ -32,11 +32,11 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.kie.kogito.index.TestUtils.getProcessCloudEvent;
import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
@@ -69,10 +69,8 @@ public void setup() {
}
@Test
- void onProcessInstanceEvent() throws Exception {
+ void onProcessInstanceEvent() {
ArgumentCaptor eventCaptor = ArgumentCaptor.forClass(ProcessInstance.class);
- ProcessInstance pi = new ProcessInstance();
- byte[] jsonContent = getObjectMapper().writeValueAsBytes(pi);
ProcessInstanceDataEvent event = getProcessCloudEvent(PROCESS_ID, PROCESS_INSTANCE_ID, COMPLETED,
ROOT_PROCESS_INSTANCE_ID, ROOT_PROCESS_ID, ROOT_PROCESS_INSTANCE_ID);
@@ -145,7 +143,7 @@ private Job buildJob() {
job.setExpirationTime(EXPIRATION_TIME);
job.setPriority(PRIORITY);
- job.setRepeatInterval(Long.valueOf(0));
+ job.setRepeatInterval(0L);
job.setRepeatLimit(0);
job.setScheduledId(SCHEDULE_ID);
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml
new file mode 100644
index 0000000000..a735b0d8a8
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-postgresql-deployment
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence PostgreSQL :: Deployment
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-deployment
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql
+
+
+ io.quarkus
+ quarkus-flyway-deployment
+
+
+ io.quarkus
+ quarkus-hibernate-orm-panache-deployment
+
+
+ io.quarkus
+ quarkus-jdbc-postgresql-deployment
+
+
+
+
+
+ maven-compiler-plugin
+
+
+
+ io.quarkus
+ quarkus-extension-processor
+ ${version.io.quarkus}
+
+
+
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java
new file mode 100644
index 0000000000..f59a2d5479
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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.persistence.deployment;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourcePatternsBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
+
+public class PostgreSQLDataIndexPersistenceProcessor extends AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor {
+
+ private static final String FEATURE = "kogito-addons-quarkus-data-index-persistence-postgresql";
+
+ @BuildStep
+ public FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+ public void addNativeResources(BuildProducer resources) {
+ resources.produce(new NativeImageResourcePatternsBuildItem.Builder().includeGlob("sql/*.sql").build());
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml
new file mode 100644
index 0000000000..591a82fd16
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml
@@ -0,0 +1,91 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-postgresql-integration-tests-process
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence PostgreSQL :: Integration Tests :: Process
+
+
+
+ org.kie.kogito
+ kogito-quarkus-processes
+
+
+ io.quarkus
+ quarkus-resteasy
+
+
+ io.quarkus
+ quarkus-resteasy-jackson
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-persistence-jdbc
+
+
+ io.quarkus
+ quarkus-agroal
+
+
+ io.quarkus
+ quarkus-jdbc-postgresql
+
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-deployment
+ ${project.version}
+ pom
+ test
+
+
+ *
+ *
+
+
+
+
+
+
+
+ io.quarkus
+ quarkus-maven-plugin
+ ${version.io.quarkus}
+
+
+
+ build
+
+
+
+
+
+
+
+
+ native
+
+
+ native
+
+
+
+ native
+ **/*IT.java
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties
new file mode 100644
index 0000000000..456f843b7a
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties
@@ -0,0 +1,7 @@
+kogito.persistence.type=jdbc
+quarkus.flyway.migrate-at-start=true
+quarkus.flyway.baseline-on-migrate=true
+
+quarkus.datasource.db-kind=postgresql
+
+quarkus.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/hello.bpmn b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/hello.bpmn
new file mode 100644
index 0000000000..939c411bbd
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/hello.bpmn
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+ _9FD38FF8-A530-41E7-8EA0-E1F71353CBB3
+
+
+ _9FD38FF8-A530-41E7-8EA0-E1F71353CBB3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _hT2oIPJzEDuE8tm0q8uK_w
+ _hT2oIPJzEDuE8tm0q8uK_w
+
+
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
new file mode 100644
index 0000000000..4fdff8d647
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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.junit.jupiter.api.Test;
+import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+import org.kie.kogito.test.quarkus.QuarkusTestProperty;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.ResourceArg;
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource.DATA_INDEX_MIGRATE_DB;
+
+@QuarkusIntegrationTest
+@QuarkusTestResource(value = DataIndexPostgreSqlHttpQuarkusTestResource.class, initArgs = { @ResourceArg(name = DATA_INDEX_MIGRATE_DB, value = "false") })
+class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @QuarkusTestProperty(name = KOGITO_DATA_INDEX_SERVICE_URL)
+ String dataIndex;
+
+ @Test
+ void testDataIndexAddon() {
+ given().contentType(ContentType.JSON)
+ .baseUri(dataIndex)
+ .body("{ \"query\" : \"{ProcessInstances{ id } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(greaterThanOrEqualTo(0)));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .post("/hello")
+ .then()
+ .statusCode(201)
+ .body("id", is(notNullValue()))
+ .extract().path("id");
+
+ given().contentType(ContentType.JSON)
+ .baseUri(dataIndex)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal: \\\"" + processInstanceId + "\\\"}}){ id, state } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(1))
+ .body("data.ProcessInstances[0].id", is(processInstanceId))
+ .body("data.ProcessInstances[0].state", is("COMPLETED"));
+ }
+
+ @Test
+ void testGraphQL() {
+ given().contentType(ContentType.HTML)
+ .when().get("/graphql")
+ .then().statusCode(404);
+ }
+
+ @Test
+ void testGraphQLUI() {
+ given().contentType(ContentType.HTML)
+ .when().get("/q/graphql-ui/")
+ .then().statusCode(404);
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml
new file mode 100644
index 0000000000..35903c7ffb
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml
@@ -0,0 +1,91 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-postgresql-integration-tests-sw
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence PostgreSQL :: Integration Tests :: SW
+
+
+
+ org.kie.kogito
+ kogito-quarkus-serverless-workflow
+
+
+ io.quarkus
+ quarkus-resteasy
+
+
+ io.quarkus
+ quarkus-resteasy-jackson
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-persistence-jdbc
+
+
+ io.quarkus
+ quarkus-agroal
+
+
+ io.quarkus
+ quarkus-jdbc-postgresql
+
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-deployment
+ ${project.version}
+ pom
+ test
+
+
+ *
+ *
+
+
+
+
+
+
+
+ io.quarkus
+ quarkus-maven-plugin
+ ${version.io.quarkus}
+
+
+
+ build
+
+
+
+
+
+
+
+
+ native
+
+
+ native
+
+
+
+ native
+ **/*IT.java
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties
new file mode 100644
index 0000000000..456f843b7a
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties
@@ -0,0 +1,7 @@
+kogito.persistence.type=jdbc
+quarkus.flyway.migrate-at-start=true
+quarkus.flyway.baseline-on-migrate=true
+
+quarkus.datasource.db-kind=postgresql
+
+quarkus.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/greet.sw.json b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/greet.sw.json
new file mode 100644
index 0000000000..a849f440e1
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/greet.sw.json
@@ -0,0 +1,71 @@
+{
+ "id": "greet",
+ "version": "1.0",
+ "name": "Greeting workflow",
+ "expressionLang": "jsonpath",
+ "description": "JSON based greeting workflow",
+ "start": "ChooseOnLanguage",
+ "functions": [
+ {
+ "name": "greetFunction",
+ "type": "custom",
+ "operation": "sysout"
+ },
+ {
+ "name": "isEnglish",
+ "type": "expression",
+ "operation" : "$.[?(@.language == 'English')]"
+ }
+ ],
+ "states": [
+ {
+ "name": "ChooseOnLanguage",
+ "type": "switch",
+ "dataConditions": [
+ {
+ "condition": "fn:isEnglish",
+ "transition": "GreetInEnglish"
+ },
+ {
+ "condition": "${ $.[?(@.language == 'Spanish')] }",
+ "transition": "GreetInSpanish"
+ }
+ ],
+ "defaultCondition": {
+ "transition": "GreetInEnglish"
+ }
+ },
+ {
+ "name": "GreetInEnglish",
+ "type": "inject",
+ "data": {
+ "greeting": "Hello from JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetInSpanish",
+ "type": "inject",
+ "data": {
+ "greeting": "Saludos desde JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetPerson",
+ "type": "operation",
+ "actions": [
+ {
+ "name": "greetAction",
+ "functionRef": {
+ "refName": "greetFunction",
+ "arguments": {
+ "message": "$.greeting $.name"
+ }
+ }
+ }
+ ],
+ "end": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
new file mode 100644
index 0000000000..b263290273
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed 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.junit.jupiter.api.Test;
+import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+import org.kie.kogito.test.quarkus.QuarkusTestProperty;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.ResourceArg;
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
+import static org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource.DATA_INDEX_MIGRATE_DB;
+
+@QuarkusIntegrationTest
+@QuarkusTestResource(value = DataIndexPostgreSqlHttpQuarkusTestResource.class, initArgs = { @ResourceArg(name = DATA_INDEX_MIGRATE_DB, value = "false") })
+class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @QuarkusTestProperty(name = KOGITO_DATA_INDEX_SERVICE_URL)
+ String dataIndex;
+
+ @Test
+ void testDataIndexAddon() {
+ given().contentType(ContentType.JSON)
+ .baseUri(dataIndex)
+ .body("{ \"query\" : \"{ProcessInstances{ id } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(greaterThanOrEqualTo(0)));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .body("{\"workflowdata\" : {\"name\" : \"John\", \"language\":\"English\"}}").when()
+ .post("/greet")
+ .then()
+ .statusCode(201)
+ .body("workflowdata.greeting", is("Hello from JSON Workflow,"))
+ .extract().path("id");
+
+ given().contentType(ContentType.JSON)
+ .baseUri(dataIndex)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal: \\\"" + processInstanceId + "\\\"}}){ id, state } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(1))
+ .body("data.ProcessInstances[0].id", is(processInstanceId))
+ .body("data.ProcessInstances[0].state", is("COMPLETED"));
+ }
+
+ @Test
+ void testGraphQL() {
+ given().contentType(ContentType.HTML)
+ .when().get("/graphql")
+ .then().statusCode(404);
+ }
+
+ @Test
+ void testGraphQLUI() {
+ given().contentType(ContentType.HTML)
+ .when().get("/q/graphql-ui/")
+ .then().statusCode(404);
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml
new file mode 100644
index 0000000000..ad03ba3520
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-postgresql-parent
+ pom
+
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence PostgreSQL
+
+
+ deployment
+ runtime
+ integration-tests-sw
+
+
+
+
+ default
+
+
+ !productized
+
+
+
+ integration-tests-process
+
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml
new file mode 100644
index 0000000000..d8a4799960
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml
@@ -0,0 +1,61 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-parent
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence-postgresql
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence PostgreSQL :: Runtime
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-runtime
+
+
+ io.quarkus
+ quarkus-flyway
+
+
+ org.kie.kogito
+ data-index-storage-postgresql
+
+
+
+
+
+ io.quarkus
+ quarkus-extension-maven-plugin
+ ${version.io.quarkus}
+
+
+ compile
+
+ extension-descriptor
+
+
+ ${project.groupId}:${project.artifactId}-deployment:${project.version}
+
+ org.kie.kogito.data-index.persistence
+
+
+
+
+
+
+ maven-compiler-plugin
+
+
+
+ io.quarkus
+ quarkus-extension-processor
+ ${version.io.quarkus}
+
+
+
+
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..e587f845dd
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,9 @@
+name: Kogito Addons Quarkus Data Index Persistence PostgreSQL
+description: Kogito Data Index Persistence PostgreSQL Add-On
+metadata:
+ keywords:
+ - data-index
+ - kogito
+ guide: https://quarkus.io/guides/kogito
+ categories:
+ - "business-automation"
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties
new file mode 100644
index 0000000000..6b647a231a
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties
@@ -0,0 +1,11 @@
+#Data Index
+kogito.apps.persistence.type=postgresql
+
+#PostgreSql
+quarkus.datasource.db-kind=postgresql
+
+#Hibernate
+quarkus.hibernate-orm.jdbc.timezone=UTC
+quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+
+quarkus.flyway.locations=classpath:db/migration
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
new file mode 100644
index 0000000000..f06aa305f2
--- /dev/null
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
@@ -0,0 +1,19 @@
+
+
+ 4.0.0
+
+ org.kie.kogito
+ data-index
+ 2.0.0-SNAPSHOT
+
+ kogito-addons-quarkus-data-index-persistence
+ Kogito Apps :: Kogito Addons Quarkus Data Index Persistence
+ pom
+
+
+ kogito-addons-quarkus-data-index-persistence-common
+ kogito-addons-quarkus-data-index-persistence-postgresql
+
+
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
index e3561c833f..c8a4df768b 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
@@ -18,6 +18,10 @@
org.kie.kogito
kogito-addons-quarkus-common-deployment
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-deployment
+
org.kie.kogito
kogito-addons-quarkus-data-index-common-runtime
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
index bb8d8d2b60..c7e7bd5cf7 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
@@ -17,7 +17,11 @@
org.kie.kogito
- data-index-common
+ data-index-graphql
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-runtime
org.kie.kogito
@@ -31,28 +35,6 @@
org.kie.kogito
kogito-addons-quarkus-source-files
-
-
- org.kie.kogito
- data-index-common
- test-jar
- test
-
-
- io.quarkus
- quarkus-junit5
- test
-
-
- org.mockito
- mockito-junit-jupiter
- test
-
-
- net.javacrumbs.json-unit
- json-unit-assertj
- test
-
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
index 13660c5bcf..4b4e861810 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
@@ -14,6 +14,10 @@
org.kie.kogito
kogito-addons-quarkus-data-index-common-deployment
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-postgresql-deployment
+
org.kie.kogito
kogito-addons-quarkus-data-index-postgresql
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
index 4021ab4db3..df7cf27fa9 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
@@ -16,7 +16,7 @@
org.kie.kogito
- data-index-storage-postgresql
+ kogito-addons-quarkus-data-index-persistence-postgresql
io.quarkus
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
index 2f1c7f3b39..06b1733993 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
@@ -8,5 +8,6 @@ quarkus.datasource.db-kind=postgresql
#Hibernate
quarkus.hibernate-orm.jdbc.timezone=UTC
-quarkus.hibernate-orm.database.generation=update
-quarkus.hibernate-orm.database.generation.halt-on-error=true
\ No newline at end of file
+quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+
+quarkus.flyway.locations=classpath:db/migration
\ No newline at end of file
diff --git a/data-index/pom.xml b/data-index/pom.xml
index c06674ea62..f43d362431 100644
--- a/data-index/pom.xml
+++ b/data-index/pom.xml
@@ -17,7 +17,10 @@
data-index-storage
data-index-common
+ data-index-test-utils
+ data-index-graphql
data-index-service
+ kogito-addons-quarkus-data-index-persistence
kogito-addons-quarkus-data-index
diff --git a/kogito-apps-bom/pom.xml b/kogito-apps-bom/pom.xml
index 307a5e5305..04fc9b5dc7 100644
--- a/kogito-apps-bom/pom.xml
+++ b/kogito-apps-bom/pom.xml
@@ -174,9 +174,25 @@
org.kie.kogito
- data-index-common
+ data-index-test-utils
${project.version}
- test-jar
+
+
+ org.kie.kogito
+ data-index-test-utils
+ ${project.version}
+ sources
+
+
+ org.kie.kogito
+ data-index-graphql
+ ${project.version}
+
+
+ org.kie.kogito
+ data-index-graphql
+ ${project.version}
+ sources
org.kie.kogito
@@ -250,6 +266,28 @@
${project.version}
sources
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-runtime
+ ${project.version}
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-runtime
+ ${project.version}
+ sources
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-deployment
+ ${project.version}
+
+
+ org.kie.kogito
+ kogito-addons-quarkus-data-index-persistence-common-deployment
+ ${project.version}
+ sources
+
org.kie.kogito
kogito-addons-quarkus-data-index-common-runtime