cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: Fixing failing test
Date Tue, 27 Jan 2015 18:20:09 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 55b805b3a -> c5dee8613


Fixing failing test

Conflicts:
	systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java


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

Branch: refs/heads/2.7.x-fixes
Commit: 6ead829d12915101b5d63292f75c04b924563c46
Parents: 55b805b
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Jan 27 16:43:17 2015 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Jan 27 18:16:52 2015 +0000

----------------------------------------------------------------------
 .../cxf/systest/ws/fault/ModifiedRequestTest.java | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6ead829d/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index a0c898c..9c1bd93 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -215,6 +215,7 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase
{
             fail("Expected failure on a modified request");
         } catch (SOAPFaultException ex) {
             SOAPFault fault = ex.getFault();
+<<<<<<< HEAD
             assertEquals("soap:Sender", fault.getFaultCode());
             assertEquals("The signature or decryption was invalid", fault.getFaultString());
             Iterator<?> subcodeIterator = fault.getFaultSubcodes();
@@ -222,6 +223,23 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase
{
             Object subcode = subcodeIterator.next();
             assertEquals(WSConstants.FAILED_CHECK, subcode);
             assertFalse(subcodeIterator.hasNext());
+=======
+            if (streaming) {
+                assertTrue("soap:Sender".equals(fault.getFaultCode())
+                           || "soap:Receiver".equals(fault.getFaultCode()));
+                assertTrue(fault.getFaultString().contains(WSSecurityException.UNIFIED_SECURITY_ERR));
+                Iterator<?> subcodeIterator = fault.getFaultSubcodes();
+                assertFalse(subcodeIterator.hasNext());
+            } else {
+                assertTrue(fault.getFaultCode().endsWith("Sender"));
+                assertEquals(fault.getFaultString(), WSSecurityException.UNIFIED_SECURITY_ERR);
+                Iterator<?> subcodeIterator = fault.getFaultSubcodes();
+                assertTrue(subcodeIterator.hasNext());
+                Object subcode = subcodeIterator.next();
+                assertEquals(WSSecurityException.SECURITY_ERROR, subcode);
+                assertFalse(subcodeIterator.hasNext());
+            }
+>>>>>>> 32e2daf... Fixing failing test
         }
     }
     


Mime
View raw message