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/06/26 19:21:21 UTC

[cxf] 03/04: CXF-8725: Allow RetryStrategy to optionally not retry for 404 responses. Fixing checkstyle violations, minor refactorings and fixes

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

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

commit 6795ec1053454aa60d6ad992fb94b2785ddf9374
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Sun Jun 26 14:27:17 2022 -0400

    CXF-8725: Allow RetryStrategy to optionally not retry for 404 responses. Fixing checkstyle violations, minor refactorings and fixes
    
    (cherry picked from commit 077b0a4ede6fbbe8c7bfb468ea358c7765f12312)
    (cherry picked from commit 6fb90d5db0a796d637abcd798d3bacd1667a4bc6)
    (cherry picked from commit 808cc39259251e09b2c64ce6efe379b69513db5d)
---
 .../java/org/apache/cxf/message/MessageUtilsTest.java     | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/core/src/test/java/org/apache/cxf/message/MessageUtilsTest.java b/core/src/test/java/org/apache/cxf/message/MessageUtilsTest.java
index 65a09d8935..eec1c94de7 100644
--- a/core/src/test/java/org/apache/cxf/message/MessageUtilsTest.java
+++ b/core/src/test/java/org/apache/cxf/message/MessageUtilsTest.java
@@ -19,7 +19,7 @@
 package org.apache.cxf.message;
 
 import java.lang.reflect.Method;
-import java.util.List;
+import java.util.Arrays;
 import java.util.Optional;
 
 import javax.xml.namespace.QName;
@@ -30,12 +30,13 @@ import org.apache.cxf.service.factory.SimpleMethodDispatcher;
 import org.apache.cxf.service.invoker.MethodDispatcher;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.OperationInfo;
-import org.hamcrest.MatcherAssert;
-import org.hamcrest.Matchers;
+
 import org.junit.Test;
 
+import static org.hamcrest.Matchers.contains;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 public class MessageUtilsTest {
@@ -86,8 +87,10 @@ public class MessageUtilsTest {
     @Test
     public void getContextualIntegers() {
         Message message = new MessageImpl();
-        message.put("key1", "1,2,invalid,3");
-        MatcherAssert.assertThat(MessageUtils.getContextualIntegers(message, "key1", List.of(0)), Matchers.contains(1,2,3));
-        MatcherAssert.assertThat(MessageUtils.getContextualIntegers(message, "invalid-key", List.of(0, 1)), Matchers.contains(0,1));
+        message.put("key1", "1, 2,invalid,3");
+        assertThat(MessageUtils.getContextualIntegers(message, "key1", Arrays.asList(0)),
+            contains(1, 2, 3));
+        assertThat(MessageUtils.getContextualIntegers(message, "invalid-key", Arrays.asList(0, 1)), 
+            contains(0, 1));
     }
 }