djcoleman commented on code in PR #4200:
URL: https://github.com/apache/camel-quarkus/pull/4200#discussion_r1001505657


##########
integration-test-groups/foundation/controlbus/src/test/java/org/apache/camel/quarkus/component/controlbus/it/ControlbusTest.java:
##########
@@ -19,13 +19,22 @@
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 @QuarkusTest
 class ControlbusTest {
 
+    @BeforeEach
+    public void startRoute() {
+        String status = RestAssured.get("/controlbus/status").asString();
+        if ("Stopped".equals(status)) {
+            RestAssured.get("/controlbus/start");
+        }
+    }
+
     @Test
-    public void test() {
+    public void testStopStart() {
         RestAssured.given()
                 .contentType(ContentType.TEXT).get("/controlbus/status")
                 .then().body(org.hamcrest.CoreMatchers.equalTo("Started"));

Review Comment:
   Good point. I refactored that test and the jvm test.
   
https://github.com/apache/camel-quarkus/pull/4200/files#diff-c93d82c8522c8189a7514a631276500d49ef7869fec288fbfb44ba92caf2231fR25



-- 
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