[camel] branch master updated (8fcda73 -> 51a6140)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated (8fcda73 -> 51a6140)

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

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


    from 8fcda73  Sync Properties
     new 09e19e3  CAMEL-15230 - remove overriden method getDestination as exchange name header not required and absence results in null operation name
     new 51a6140  CAMEL-15230 - remove redundant 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:
 .../decorators/RabbitmqSpanDecorator.java          | 13 -------
 .../decorators/RabbitmqSpanDecoratorTest.java      | 41 ----------------------
 2 files changed, 54 deletions(-)
 delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecoratorTest.java

Reply | Threaded
Open this post in threaded view
|

[camel] 01/02: CAMEL-15230 - remove overriden method getDestination as exchange name header not required and absence results in null operation name

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

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

commit 09e19e34e0c92fb5bb0e203f3205a463f496b397
Author: Matthew Robbins <[hidden email]>
AuthorDate: Tue Jun 30 09:46:37 2020 +0100

    CAMEL-15230 - remove overriden method getDestination as exchange name header not required and absence results in null operation name
---
 .../camel/opentracing/decorators/RabbitmqSpanDecorator.java | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java
index 1d47fb3..d741744 100644
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java
+++ b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java
@@ -16,16 +16,8 @@
  */
 package org.apache.camel.opentracing.decorators;
 
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-
 public class RabbitmqSpanDecorator extends AbstractMessagingSpanDecorator {
 
-    /**
-     * Constants copied from {@link org.apache.camel.component.rabbitmq.RabbitMQConstants}
-     */
-    protected static final String EXCHANGE_NAME = "rabbitmq.EXCHANGE_NAME";
-
     @Override
     public String getComponent() {
         return "rabbitmq";
@@ -36,9 +28,4 @@ public class RabbitmqSpanDecorator extends AbstractMessagingSpanDecorator {
         return "org.apache.camel.component.rabbitmq.RabbitMQComponent";
     }
 
-    @Override
-    public String getDestination(Exchange exchange, Endpoint endpoint) {
-        return (String)exchange.getIn().getHeader(EXCHANGE_NAME);
-    }
-
 }

Reply | Threaded
Open this post in threaded view
|

[camel] 02/02: CAMEL-15230 - remove redundant test

acosentino
In reply to this post by acosentino
This is an automated email from the ASF dual-hosted git repository.

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

commit 51a6140e375e3d6b1e2aade2e840261171af7fed
Author: Matthew Robbins <[hidden email]>
AuthorDate: Tue Jun 30 11:15:19 2020 +0100

    CAMEL-15230 - remove redundant test
---
 .../decorators/RabbitmqSpanDecoratorTest.java      | 41 ----------------------
 1 file changed, 41 deletions(-)

diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecoratorTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecoratorTest.java
deleted file mode 100644
index c67c024..0000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecoratorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing.decorators;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.junit.Assert.assertEquals;
-
-public class RabbitmqSpanDecoratorTest {
-
-    @Test
-    public void testGetDestinationHeaderTopic() {
-        Exchange exchange = Mockito.mock(Exchange.class);
-        Message message = Mockito.mock(Message.class);
-
-        Mockito.when(exchange.getIn()).thenReturn(message);
-        Mockito.when(message.getHeader(RabbitmqSpanDecorator.EXCHANGE_NAME)).thenReturn("test");
-
-        RabbitmqSpanDecorator decorator = new RabbitmqSpanDecorator();
-
-        assertEquals("test", decorator.getDestination(exchange, null));
-    }
-
-}