This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new aefaf14c187 Adjust test lifecycle to recent refactoring in camel-test-infra-activemq (#618) aefaf14c187 is described below commit aefaf14c187512c6f93b0cb72d1ba05198288127 Author: Tom Cunningham <tcunn...@redhat.com> AuthorDate: Wed Aug 31 00:29:28 2022 -0400 Adjust test lifecycle to recent refactoring in camel-test-infra-activemq (#618) --- .../camel/component/paho/springboot/PahoComponentTest.java | 9 ++++++++- .../camel/component/paho/springboot/PahoOverrideTopicTest.java | 8 +++++++- .../camel/component/paho/springboot/PahoToDSendDynamicTest.java | 8 +++++++- .../org/apache/camel/component/paho/springboot/PahoToDTest.java | 8 +++++++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoComponentTest.java b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoComponentTest.java index 86131bcd09b..a22a7390479 100644 --- a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoComponentTest.java +++ b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoComponentTest.java @@ -33,6 +33,7 @@ import org.apache.camel.component.paho.PahoMessage; import org.apache.camel.component.paho.PahoPersistence; import org.apache.camel.spring.boot.CamelAutoConfiguration; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -65,7 +66,7 @@ public class PahoComponentTest { static int mqttPort = AvailablePortFinder.getNextAvailable(); @RegisterExtension - public static ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder + public ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder .bare() .withPersistent(false) .withMqttTransport(mqttPort) @@ -193,6 +194,12 @@ public class PahoComponentTest { mock.assertIsSatisfied(); } + + @AfterAll + public void cleanUp() { + service.shutdown(); + } + // ************************************* // Config diff --git a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoOverrideTopicTest.java b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoOverrideTopicTest.java index 319f82dd1e8..187d4380e8e 100644 --- a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoOverrideTopicTest.java +++ b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoOverrideTopicTest.java @@ -27,6 +27,7 @@ import org.apache.camel.component.paho.PahoComponent; import org.apache.camel.component.paho.PahoConstants; import org.apache.camel.spring.boot.CamelAutoConfiguration; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -55,7 +56,7 @@ public class PahoOverrideTopicTest { static int mqttPort = AvailablePortFinder.getNextAvailable(); @RegisterExtension - public static ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder + public ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder .bare() .withPersistent(false) .withMqttTransport(mqttPort) @@ -83,6 +84,11 @@ public class PahoOverrideTopicTest { // Then mock.assertIsSatisfied(); } + + @AfterAll + public void cleanUp() { + service.shutdown(); + } // ************************************* // Config diff --git a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDSendDynamicTest.java b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDSendDynamicTest.java index d7f20dbadd6..2c262cdcd76 100644 --- a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDSendDynamicTest.java +++ b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDSendDynamicTest.java @@ -27,6 +27,7 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.paho.PahoComponent; import org.apache.camel.spring.boot.CamelAutoConfiguration; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -57,7 +58,7 @@ public class PahoToDSendDynamicTest { static int mqttPort = AvailablePortFinder.getNextAvailable(); @RegisterExtension - public static ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder + public ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder .bare() .withPersistent(false) .withMqttTransport(mqttPort) @@ -93,6 +94,11 @@ public class PahoToDSendDynamicTest { assertEquals("Hello beer", out); } + @AfterAll + public void cleanUp() { + service.shutdown(); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDTest.java b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDTest.java index 38cb5c5016b..9cb39bdbdaf 100644 --- a/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDTest.java +++ b/components-starter/camel-paho-starter/src/test/java/org/apache/camel/component/paho/springboot/PahoToDTest.java @@ -26,6 +26,7 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.paho.PahoComponent; import org.apache.camel.spring.boot.CamelAutoConfiguration; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -54,7 +55,7 @@ public class PahoToDTest { static int mqttPort = AvailablePortFinder.getNextAvailable(); @RegisterExtension - public static ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder + public ActiveMQEmbeddedService service = ActiveMQEmbeddedServiceBuilder .bare() .withPersistent(false) .withMqttTransport(mqttPort) @@ -85,6 +86,11 @@ public class PahoToDTest { mockBar.assertIsSatisfied(); mockBeer.assertIsSatisfied(); } + + @AfterAll + public void cleanUp() { + service.shutdown(); + } // ************************************* // Config