cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccri...@apache.org
Subject [cxf] branch master updated: Use MP Rest Client 1.2.0 - re-enabled ignored test case
Date Mon, 21 Jan 2019 23:51:44 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 8766a75  Use MP Rest Client 1.2.0 - re-enabled ignored test case
8766a75 is described below

commit 8766a7535603bfc0b2d1f8b9b70150d2471c5c2a
Author: Andy McCright <j.andrew.mccright@gmail.com>
AuthorDate: Mon Jan 21 17:51:02 2019 -0600

    Use MP Rest Client 1.2.0 - re-enabled ignored test case
---
 rt/rs/microprofile-client/pom.xml                  |  2 +-
 .../cxf/microprofile/client/ClientHeadersTest.java | 29 +++++++++++-----------
 .../client/mock/HeadersOnMethodClient.java         | 12 ++++-----
 systests/microprofile/client/async/pom.xml         |  2 +-
 systests/microprofile/client/jaxrs/pom.xml         |  2 +-
 systests/microprofile/pom.xml                      |  2 +-
 6 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/rt/rs/microprofile-client/pom.xml b/rt/rs/microprofile-client/pom.xml
index 8235b21..ae16642 100644
--- a/rt/rs/microprofile-client/pom.xml
+++ b/rt/rs/microprofile-client/pom.xml
@@ -42,7 +42,7 @@
             org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace="http://cxf.apache.org/blueprint/jaxrs-client"
         </cxf.export.service>
         <cxf.bundle.activator>org.apache.cxf.jaxrs.client.blueprint.Activator</cxf.bundle.activator>
-        <mp.rest.client.version>1.2-RC1</mp.rest.client.version>
+        <mp.rest.client.version>1.2.0</mp.rest.client.version>
     </properties>
     <dependencies>
         <dependency>
diff --git a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/ClientHeadersTest.java
b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/ClientHeadersTest.java
index b8c0db5..3a3f3f2 100644
--- a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/ClientHeadersTest.java
+++ b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/ClientHeadersTest.java
@@ -23,6 +23,7 @@ import java.net.URI;
 import org.apache.cxf.microprofile.client.mock.HeaderCaptureClientRequestFilter;
 import org.apache.cxf.microprofile.client.mock.HeadersFactoryClient;
 import org.apache.cxf.microprofile.client.mock.HeadersOnInterfaceClient;
+import org.apache.cxf.microprofile.client.mock.HeadersOnMethodClient;
 import org.apache.cxf.microprofile.client.mock.MyClientHeadersFactory;
 import org.eclipse.microprofile.rest.client.RestClientBuilder;
 
@@ -56,21 +57,19 @@ public class ClientHeadersTest {
         assertEquals("valueForIntfHeader4", getOutboundHeaders().getFirst("IntfHeader4"));
     }
 
-
-    //TODO: uncomment once @ClientHeaderParams (plural) is updated to include target of TYPE
and METHOD
-//    @Test
-//    public void testClientHeaderParamsOnMethod() {
-//        HeadersOnMethodClient client = RestClientBuilder.newBuilder()
-//                                                        .baseUri(URI.create("http://localhost/notUsed"))
-//                                                        .register(HeaderCaptureClientRequestFilter.class)
-//                                                        .build(HeadersOnMethodClient.class);
-//        assertEquals("SUCCESS", client.delete("ignored"));
-//        assertNotNull(getOutboundHeaders());
-//        assertEquals("valueA", getOutboundHeaders().getFirst("MethodHeader1"));
-//        assertEquals("valueB,valueC", getOutboundHeaders().getFirst("MethodHeader2"));
-//        assertEquals("HeadersOnMethodClientValueForMethodHeader3", getOutboundHeaders().getFirst("MethodHeader3"));
-//        assertEquals("valueForMethodHeader4", getOutboundHeaders().getFirst("MethodHeader4"));
-//    }
+    @Test
+    public void testClientHeaderParamsOnMethod() {
+        HeadersOnMethodClient client = RestClientBuilder.newBuilder()
+                                                        .baseUri(URI.create("http://localhost/notUsed"))
+                                                        .register(HeaderCaptureClientRequestFilter.class)
+                                                        .build(HeadersOnMethodClient.class);
+        assertEquals("SUCCESS", client.delete("ignored"));
+        assertNotNull(getOutboundHeaders());
+        assertEquals("valueA", getOutboundHeaders().getFirst("MethodHeader1"));
+        assertEquals("valueB,valueC", getOutboundHeaders().getFirst("MethodHeader2"));
+        assertEquals("HeadersOnMethodClientValueForMethodHeader3", getOutboundHeaders().getFirst("MethodHeader3"));
+        assertEquals("valueForMethodHeader4", getOutboundHeaders().getFirst("MethodHeader4"));
+    }
 
     @Test
     public void testClientHeadersFactory() {
diff --git a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/HeadersOnMethodClient.java
b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/HeadersOnMethodClient.java
index 09dc70e..799620b 100644
--- a/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/HeadersOnMethodClient.java
+++ b/rt/rs/microprofile-client/src/test/java/org/apache/cxf/microprofile/client/mock/HeadersOnMethodClient.java
@@ -21,6 +21,7 @@ package org.apache.cxf.microprofile.client.mock;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.Path;
 
+import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
 
 
 public interface HeadersOnMethodClient {
@@ -29,12 +30,11 @@ public interface HeadersOnMethodClient {
         return "HeadersOnMethodClientValueFor" + headerName;
     }
 
-    //TODO: uncomment once @ClientHeaderParams (plural) is updated to include target of TYPE
and METHOD
-//    @ClientHeaderParam(name = "MethodHeader1", value = "valueA")
-//    @ClientHeaderParam(name = "MethodHeader2", value = {"valueB", "valueC"})
-//    @ClientHeaderParam(name = "MethodHeader3", value = "{computeHeader}")
-//    @ClientHeaderParam(name = "MethodHeader4",
-//        value = "{org.apache.cxf.microprofile.client.mock.HeaderGenerator.generateHeader}")
+    @ClientHeaderParam(name = "MethodHeader1", value = "valueA")
+    @ClientHeaderParam(name = "MethodHeader2", value = {"valueB", "valueC"})
+    @ClientHeaderParam(name = "MethodHeader3", value = "{computeHeader}")
+    @ClientHeaderParam(name = "MethodHeader4",
+        value = "{org.apache.cxf.microprofile.client.mock.HeaderGenerator.generateHeader}")
     @DELETE
     @Path("/")
     String delete(String someValue);
diff --git a/systests/microprofile/client/async/pom.xml b/systests/microprofile/client/async/pom.xml
index a85ad88..5d3c87c 100644
--- a/systests/microprofile/client/async/pom.xml
+++ b/systests/microprofile/client/async/pom.xml
@@ -33,7 +33,7 @@
     <properties>
         <cxf.module.name>org.apache.cxf.systests.microprofile.async</cxf.module.name>
         <cxf.geronimo.config.version>1.0</cxf.geronimo.config.version>
-        <cxf.microprofile.rest.client.version>1.2-RC1</cxf.microprofile.rest.client.version>
+        <cxf.microprofile.rest.client.version>1.2.0</cxf.microprofile.rest.client.version>
         <cxf.wiremock.params>--port=8765</cxf.wiremock.params>
         <cxf.weld.se.version>2.4.5.Final</cxf.weld.se.version>
         <cxf.arquillian.weld.container.version>2.0.0.Final</cxf.arquillian.weld.container.version>
diff --git a/systests/microprofile/client/jaxrs/pom.xml b/systests/microprofile/client/jaxrs/pom.xml
index c53a686..4dba67c 100644
--- a/systests/microprofile/client/jaxrs/pom.xml
+++ b/systests/microprofile/client/jaxrs/pom.xml
@@ -33,7 +33,7 @@
     <properties>
         <cxf.module.name>org.apache.cxf.systests.microprofile.jaxrs</cxf.module.name>
         <cxf.geronimo.config.version>1.0</cxf.geronimo.config.version>
-        <cxf.microprofile.rest.client.version>1.2-RC1</cxf.microprofile.rest.client.version>
+        <cxf.microprofile.rest.client.version>1.2.0</cxf.microprofile.rest.client.version>
     </properties>
         <dependencies>
             <dependency>
diff --git a/systests/microprofile/pom.xml b/systests/microprofile/pom.xml
index 8889de5..992f278 100644
--- a/systests/microprofile/pom.xml
+++ b/systests/microprofile/pom.xml
@@ -33,7 +33,7 @@
     <url>http://cxf.apache.org</url>
     <properties>
         <cxf.geronimo.config.version>1.0</cxf.geronimo.config.version>
-        <cxf.microprofile.rest.client.version>1.2-RC1</cxf.microprofile.rest.client.version>
+        <cxf.microprofile.rest.client.version>1.2.0</cxf.microprofile.rest.client.version>
         <cxf.wiremock.params>--port=8765</cxf.wiremock.params>
         <cxf.weld.se.version>2.4.5.Final</cxf.weld.se.version>
         <cxf.arquillian.weld.container.version>2.0.0.Final</cxf.arquillian.weld.container.version>


Mime
View raw message