You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/03/01 11:46:45 UTC

(camel) branch main updated (7ef713c9108 -> bf2956bd6a6)

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 7ef713c9108 CAMEL-20502: JacksonAvro should be default avro dataformat. Add schemaResolver with classname as option in the model. (#13361)
     new 94f7ad13b06 CAMEL-20477: JmsEndpointConfigurationTest should not instantiate two brokers
     new bf2956bd6a6 CAMEL-20477: JmsFormatDateHeadersToIso8601Test should recycle the broker for every test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jms/JmsEndpointConfigurationTest.java          | 28 ++++++++++------------
 .../jms/JmsFormatDateHeadersToIso8601Test.java     |  7 ++++--
 2 files changed, 17 insertions(+), 18 deletions(-)


(camel) 02/02: CAMEL-20477: JmsFormatDateHeadersToIso8601Test should recycle the broker for every test

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit bf2956bd6a6e6bb07f13438b445495efbc2d4f1d
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Mar 1 10:57:01 2024 +0100

    CAMEL-20477: JmsFormatDateHeadersToIso8601Test should recycle the broker for every test
---
 .../camel/component/jms/JmsFormatDateHeadersToIso8601Test.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsFormatDateHeadersToIso8601Test.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsFormatDateHeadersToIso8601Test.java
index 9f7637640c0..ac4e9214f62 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsFormatDateHeadersToIso8601Test.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsFormatDateHeadersToIso8601Test.java
@@ -27,6 +27,8 @@ import org.apache.camel.test.infra.artemis.common.ConnectionFactoryHelper;
 import org.apache.camel.test.infra.artemis.services.ArtemisService;
 import org.apache.camel.test.infra.artemis.services.ArtemisVMService;
 import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Tags;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -35,13 +37,14 @@ import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknow
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
-@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@Tags({ @Tag("not-parallel") })
+@TestInstance(TestInstance.Lifecycle.PER_METHOD)
 public class JmsFormatDateHeadersToIso8601Test extends CamelTestSupport {
 
     private static final Date DATE = Date.from(Instant.ofEpochMilli(1519672338000L));
 
     @RegisterExtension
-    public ArtemisService service = new ArtemisVMService();
+    public static ArtemisService service = new ArtemisVMService();
 
     @Test
     public void testComponentFormatDateHeaderToIso8601() {


(camel) 01/02: CAMEL-20477: JmsEndpointConfigurationTest should not instantiate two brokers

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 94f7ad13b061610df8f79c61d69565179440ae94
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Mar 1 10:52:22 2024 +0100

    CAMEL-20477: JmsEndpointConfigurationTest should not instantiate two brokers
---
 .../jms/JmsEndpointConfigurationTest.java          | 28 ++++++++++------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java
index ae63cbe4072..5efb34fde34 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsEndpointConfigurationTest.java
@@ -29,12 +29,13 @@ import org.apache.camel.Producer;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.ServiceStatus;
-import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.infra.artemis.services.ArtemisService;
 import org.apache.camel.test.infra.artemis.services.ArtemisServiceFactory;
 import org.apache.camel.test.infra.core.CamelContextExtension;
 import org.apache.camel.test.infra.core.DefaultCamelContextExtension;
+import org.apache.camel.test.infra.core.api.CamelTestSupportHelper;
 import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -57,30 +58,28 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
-public class JmsEndpointConfigurationTest extends AbstractJMSTest {
+public class JmsEndpointConfigurationTest implements CamelTestSupportHelper {
+
+    @Order(1)
+    @RegisterExtension
+    public static ArtemisService service = ArtemisServiceFactory.createVMService();
 
     @Order(2)
     @RegisterExtension
     public static CamelContextExtension camelContextExtension = new DefaultCamelContextExtension();
-    private static final Logger LOG = LoggerFactory.getLogger(JmsEndpointConfigurationTest.class);
 
-    @RegisterExtension
-    public ArtemisService service = ArtemisServiceFactory.createVMService();
+    private static final Logger LOG = LoggerFactory.getLogger(JmsEndpointConfigurationTest.class);
     protected CamelContext context;
     protected ProducerTemplate template;
     protected ConsumerTemplate consumer;
 
     @BindToRegistry("myConnectionFactory")
     private final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(service.serviceAddress());
+
     private final Processor failProcessor = exchange -> fail("Should not be reached");
 
     private final Processor dummyProcessor = exchange -> LOG.info("Received: {}", exchange);
 
-    @Override
-    protected String getComponentName() {
-        return "jms";
-    }
-
     @Test
     public void testDurableSubscriberConfiguredWithDoubleSlash() throws Exception {
         JmsEndpoint endpoint
@@ -143,6 +142,7 @@ public class JmsEndpointConfigurationTest extends AbstractJMSTest {
                 "The connectionFactory should be the instance of UserCredentialsConnectionFactoryAdapter");
     }
 
+    @Disabled
     @Test
     public void testSetConnectionFactoryAndUsernameAndPassword() {
         JmsEndpoint endpoint = resolveMandatoryEndpoint(
@@ -357,7 +357,7 @@ public class JmsEndpointConfigurationTest extends AbstractJMSTest {
         assertEquals("JmsConsumer[Foo.JmsEndpointConfigurationTest.New]", endpoint.getThreadName());
         assertEquals(-1, endpoint.getTimeToLive());
         assertEquals(-1, endpoint.getTransactionTimeout());
-        assertEquals(1, endpoint.getAcknowledgementMode());
+        assertEquals(-1, endpoint.getAcknowledgementMode());
         assertNull(endpoint.getAcknowledgementModeName());
         assertEquals(-1, endpoint.getCacheLevel());
         assertNull(endpoint.getCacheLevelName());
@@ -596,11 +596,6 @@ public class JmsEndpointConfigurationTest extends AbstractJMSTest {
         assertTrue(listenerContainer.isSubscriptionDurable(), "isSubscriptionDurable()");
     }
 
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return null;
-    }
-
     @Override
     public CamelContextExtension getCamelContextExtension() {
         return camelContextExtension;
@@ -612,4 +607,5 @@ public class JmsEndpointConfigurationTest extends AbstractJMSTest {
         template = camelContextExtension.getProducerTemplate();
         consumer = camelContextExtension.getConsumerTemplate();
     }
+
 }