avano commented on code in PR #4918: URL: https://github.com/apache/camel-quarkus/pull/4918#discussion_r1205182616
########## 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: it we want to avoid this, it can be moved to `BeforeEach` where it should work without the property, either adding a boolean to the resource to start the routes only once, or just call `startAllRoutes` everytime -- 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