You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2022/07/07 18:43:46 UTC

[cxf] branch 3.5.x-fixes updated (f19236e64a -> 03ccf1385b)

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

reta pushed a change to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


    from f19236e64a Recording .gitmergeinfo Changes
     new 1a55fbe52a CXF-8735: AbstractStaticFailoverStrategy: UnsupportedOperationException when there are no services associated with the endpoint
     new 03ccf1385b Recording .gitmergeinfo Changes

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:
 .gitmergeinfo                                       |  2 ++
 .../clustering/AbstractStaticFailoverStrategy.java  |  2 +-
 .../apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java | 21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)


[cxf] 01/02: CXF-8735: AbstractStaticFailoverStrategy: UnsupportedOperationException when there are no services associated with the endpoint

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

reta pushed a commit to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 1a55fbe52a31643eff193e7344b666346bec4b44
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Thu Jul 7 13:33:20 2022 -0400

    CXF-8735: AbstractStaticFailoverStrategy: UnsupportedOperationException when there are no services associated with the endpoint
    
    (cherry picked from commit 9c3dc283369f6c829b040920cbb93002daf3d440)
    (cherry picked from commit 1823d59b20554658d4cfaac407d66d1c6923d57a)
---
 .../clustering/AbstractStaticFailoverStrategy.java  |  2 +-
 .../apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
index 68535cc9f6..09755dd8f6 100644
--- a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
+++ b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
@@ -138,7 +138,7 @@ public abstract class AbstractStaticFailoverStrategy implements FailoverStrategy
         // If there are no services associated with this endpoint (often in case of JAX-RS), 
         // returning the endpoint itself if allowed.
         if (services.isEmpty() && acceptCandidatesWithSameAddress) {
-            return Collections.singletonList(endpoint);
+            return new ArrayList<>(Collections.singleton(endpoint));
         }
         
         QName currentBinding = endpoint.getBinding().getBindingInfo().getName();
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
index cee49ed4c9..eb70ed1caa 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
@@ -43,6 +43,8 @@ import javax.xml.ws.Service;
 import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.clustering.FailoverFeature;
+import org.apache.cxf.clustering.RetryStrategy;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.ext.logging.LoggingInInterceptor;
 import org.apache.cxf.ext.logging.LoggingOutInterceptor;
@@ -917,6 +919,25 @@ public class JAXRSSoapBookTest extends AbstractBusClientServerTestBase {
         }
     }
 
+    @Test
+    public void testCheckBookClientErrorResponseWithFailover() {
+        final RetryStrategy retry = new RetryStrategy();
+        retry.setMaxNumberOfRetries(1);
+
+        final FailoverFeature failoverFeature = new FailoverFeature();
+        failoverFeature.setStrategy(retry);
+        
+        String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
+        BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
+                                          BookStoreJaxrsJaxws.class,
+                                          Collections.singletonList(new DummyResponseExceptionMapper()),
+                                          Collections.singletonList(failoverFeature),
+                                          null);
+        
+        Response response = proxy.checkBook(100L);
+        assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus());
+    }
+
     private void serverFaultInInterceptorTest(String param) {
         String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
         JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();


[cxf] 02/02: Recording .gitmergeinfo Changes

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

reta pushed a commit to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 03ccf1385b6a4c68d50ef5ecacfec7cad5dd6399
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Thu Jul 7 14:37:19 2022 -0400

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 2c18d052f1..8a96efd5bc 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -21,6 +21,7 @@ B c122fbdd9e1923cdb4daaef16f2e0fd65e2498b6
 B cad4f0b76bb79f82a5ef4bc7e435e93996eb884b
 B cfca13411eb72d2d07ca243e24ced6e9743e6124
 B d77fd3ac9eb11bd69e5d534dffe53296e4c00ae8
+B d7b9a3095d864a6b41dc0ee07dffbd0c36d7cdf6
 M 10c6232ee9af28bbea549433f5c6e64af470fc1d
 M 11502cd9e0f85ded3ae83b3df7226d2e107159ab
 M 15063b0f08c66011f24f2d32352200736ee83710
@@ -45,6 +46,7 @@ M 905f4f91e4d0b5c4d145729f16bad90b1847f0be
 M 96e71237bae2eb987a5fbe67d21e9e1e19f2d158
 M 97dc25412eac3342f643ea5faa38c9718d2139bf
 M 980ebec9b4e3cb99c0386ba3c795cad21e924ac7
+M 9b8c9b20114b7102fc1330a117c9e017140f0eb8
 M a75b56a7c3826a48320202aca771cbcbdca6a350
 M a903a5392b3cd2b5925c6afa46f289b3b94a694a
 M b207c718e84bed8120bb114f1d79f575094c3a14