ppalaga commented on code in PR #4918:
URL: https://github.com/apache/camel-quarkus/pull/4918#discussion_r1205624084


##########
integration-tests/messaging/common/src/test/java/org/apache/camel/quarkus/component/messaging/it/AbstractMessagingTest.java:
##########
@@ -25,15 +25,42 @@
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import jakarta.json.bind.JsonbBuilder;
+import org.eclipse.microprofile.config.ConfigProvider;
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
+import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
 import static org.hamcrest.core.Is.is;
 
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public abstract class AbstractMessagingTest {
+    protected String queue;
+    protected String queue2;
+    protected String topic;
+
+    @BeforeAll
+    public void startRoutes(TestInfo info) {
+        // At this point RestAssured is not configured to use the test port
+        // see 
https://github.com/quarkusio/quarkus/issues/7690#issuecomment-596543310
+        // The comment states it does not work in native, however it seems to 
work fine
+        RestAssured.given()
+                
.port(ConfigProvider.getConfig().getValue("quarkus.http.test-port", 
Integer.class))

Review Comment:
   I do not mind leaving it like this as long as it works in both JVM and 
native modes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to