This is an automated email from the ASF dual-hosted git repository.
fjtiradosarti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new cc3c6cd35 [Fix_#2183] Removing quarkus test utils from common module
(#2184)
cc3c6cd35 is described below
commit cc3c6cd358ef98cd52be703cbfb210be9de5b849
Author: Francisco Javier Tirado Sarti
<[email protected]>
AuthorDate: Wed Feb 5 13:17:50 2025 +0100
[Fix_#2183] Removing quarkus test utils from common module (#2184)
---
.../integration-tests-jobs-service-common/pom.xml | 15 ---------------
.../src/main/java/org/kie/kogito/test/TestUtils.java | 18 ------------------
.../kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java | 18 +++++++++++++++++-
3 files changed, 17 insertions(+), 34 deletions(-)
diff --git
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
index d853287c8..2e8c1b8bf 100644
---
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
+++
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
@@ -51,10 +51,6 @@
<artifactId>junit-jupiter-api</artifactId>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.kie.kogito</groupId>
- <artifactId>kogito-quarkus-test-utils</artifactId>
- </dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
@@ -84,17 +80,6 @@
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-test-utils</artifactId>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>org.testcontainers</groupId>
- <artifactId>oracle-xe</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.oracle.database.jdbc</groupId>
- <artifactId>ojdbc11</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
-
</project>
diff --git
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
index c97066795..98ffcbf58 100644
---
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
+++
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
@@ -19,18 +19,12 @@
package org.kie.kogito.test;
import java.time.Duration;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
import org.awaitility.Awaitility;
-import org.kie.kogito.test.quarkus.kafka.KafkaTestClient;
import io.restassured.http.ContentType;
-import io.restassured.path.json.JsonPath;
import static io.restassured.RestAssured.given;
-import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.is;
public class TestUtils {
@@ -38,18 +32,6 @@ public class TestUtils {
private TestUtils() {
}
- public static JsonPath waitForEvent(KafkaTestClient kafkaClient, String
topic, long seconds) throws Exception {
- final CountDownLatch countDownLatch = new CountDownLatch(1);
- final AtomicReference<String> cloudEvent = new AtomicReference<>();
- kafkaClient.consume(topic, rawCloudEvent -> {
- cloudEvent.set(rawCloudEvent);
- countDownLatch.countDown();
- });
- // give some time to consume the event.
- assertThat(countDownLatch.await(seconds, TimeUnit.SECONDS)).isTrue();
- return new JsonPath(cloudEvent.get());
- }
-
public static void assertJobsAndProcessOnDataIndex(String dataIndexURL,
String processId, String processInstanceId, String processStatus, String
jobStatus, Duration timeout) {
if (dataIndexURL != null) {
String query = "{ \"query\" : " +
diff --git
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
index 6e36d1a2c..20ab7530b 100644
---
a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
+++
b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
@@ -18,6 +18,10 @@
*/
package org.kie.kogito.it.jobs;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
import org.eclipse.microprofile.config.ConfigProvider;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -26,7 +30,7 @@ import
org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;
import io.restassured.path.json.JsonPath;
-import static org.kie.kogito.test.TestUtils.waitForEvent;
+import static org.assertj.core.api.Assertions.assertThat;
public class KafkaBaseSwitchStateTimeoutsIT extends BaseSwitchStateTimeoutsIT {
@@ -44,6 +48,18 @@ public class KafkaBaseSwitchStateTimeoutsIT extends
BaseSwitchStateTimeoutsIT {
kafkaClient.shutdown();
}
+ private static JsonPath waitForEvent(KafkaTestClient kafkaClient, String
topic, long seconds) throws Exception {
+ final CountDownLatch countDownLatch = new CountDownLatch(1);
+ final AtomicReference<String> cloudEvent = new AtomicReference<>();
+ kafkaClient.consume(topic, rawCloudEvent -> {
+ cloudEvent.set(rawCloudEvent);
+ countDownLatch.countDown();
+ });
+ // give some time to consume the event.
+ assertThat(countDownLatch.await(seconds, TimeUnit.SECONDS)).isTrue();
+ return new JsonPath(cloudEvent.get());
+ }
+
@Override
protected void verifyNoDecisionEventWasProduced(String processInstanceId)
throws Exception {
JsonPath result = waitForEvent(kafkaClient,
KOGITO_OUTGOING_STREAM_TOPIC, 50);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]