cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: CXF-6360: Integration with Apache HTrace. Minor fixes for JAX-WS client interceptors.
Date Sat, 26 Sep 2015 13:36:30 GMT
Repository: cxf
Updated Branches:
  refs/heads/master f96f50e5a -> 091f8bef0


CXF-6360: Integration with Apache HTrace. Minor fixes for JAX-WS client interceptors.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/091f8bef
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/091f8bef
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/091f8bef

Branch: refs/heads/master
Commit: 091f8bef03e671f151e21a890159e5033b1c5d86
Parents: f96f50e
Author: reta <drreta@gmail.com>
Authored: Sat Sep 26 09:35:39 2015 -0400
Committer: reta <drreta@gmail.com>
Committed: Sat Sep 26 09:35:56 2015 -0400

----------------------------------------------------------------------
 .../cxf/tracing/htrace/HTraceClientStartInterceptor.java       | 2 +-
 .../cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java    | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/091f8bef/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/tracing/htrace/HTraceClientStartInterceptor.java
----------------------------------------------------------------------
diff --git a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/tracing/htrace/HTraceClientStartInterceptor.java
b/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/tracing/htrace/HTraceClientStartInterceptor.java
index 72005eb..feb1512 100644
--- a/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/tracing/htrace/HTraceClientStartInterceptor.java
+++ b/integration/tracing/tracing-htrace/src/main/java/org/apache/cxf/tracing/htrace/HTraceClientStartInterceptor.java
@@ -40,7 +40,7 @@ public class HTraceClientStartInterceptor extends AbstractHTraceClientIntercepto
     @Override
     public void handleMessage(Message message) throws Fault {
         Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));

-        TraceScope scope = super.startTraceSpan(headers, (String)message.get(Message.REQUEST_URI),

+        TraceScope scope = super.startTraceSpan(headers, (String)message.get(Message.ENDPOINT_ADDRESS),

             (String)message.get(Message.HTTP_REQUEST_METHOD));
         message.getExchange().put(TRACE_SPAN, scope);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/091f8bef/systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java
----------------------------------------------------------------------
diff --git a/systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java
b/systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java
index 66810c1..1bee153 100644
--- a/systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java
+++ b/systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/htrace/HTraceTracingTest.java
@@ -141,6 +141,9 @@ public class HTraceTracingTest extends AbstractBusClientServerTestBase
{
         assertThat(TestSpanReceiver.getAllSpans().size(), equalTo(3));
         assertThat(TestSpanReceiver.getAllSpans().get(0).getDescription(), equalTo("Get Books"));
         assertThat(TestSpanReceiver.getAllSpans().get(0).getParents().length, equalTo(1));
+        assertThat(TestSpanReceiver.getAllSpans().get(1).getDescription(), equalTo("POST
/BookStore"));
+        assertThat(TestSpanReceiver.getAllSpans().get(2).getDescription(), 
+            equalTo("POST http://localhost:" + PORT + "/BookStore"));
         
         final Map<String, List<String>> response = getResponseHeaders(service);
         assertThat(response.get(TracerHeaders.DEFAULT_HEADER_TRACE_ID), not(nullValue()));
@@ -156,7 +159,6 @@ public class HTraceTracingTest extends AbstractBusClientServerTestBase
{
         final BookStoreService service = createJaxWsService(new Configurator() {
             @Override
             public void configure(final JaxWsProxyFactoryBean factory) {
-                
                 factory.getOutInterceptors().add(new HTraceClientStartInterceptor(sampler));
                 factory.getInInterceptors().add(new HTraceClientStopInterceptor());
             }
@@ -169,7 +171,7 @@ public class HTraceTracingTest extends AbstractBusClientServerTestBase
{
             assertThat(TestSpanReceiver.getAllSpans().size(), equalTo(2));
             assertThat(TestSpanReceiver.getAllSpans().get(0).getDescription(), equalTo("Get
Books"));
             assertThat(TestSpanReceiver.getAllSpans().get(0).getParents().length, equalTo(1));
-            assertThat(TestSpanReceiver.getAllSpans().get(1).getDescription(), equalTo("POST
/BookStore"));        
+            assertThat(TestSpanReceiver.getAllSpans().get(1).getDescription(), equalTo("POST
/BookStore"));
         }
         
         assertThat(TestSpanReceiver.getAllSpans().size(), equalTo(3));


Mime
View raw message