syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1597116 - /syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
Date Fri, 23 May 2014 15:29:37 GMT
Author: coheigea
Date: Fri May 23 15:29:37 2014
New Revision: 1597116

URL: http://svn.apache.org/r1597116
Log:
Fix for failing test with JDK8

Modified:
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1597116&r1=1597115&r2=1597116&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Fri
May 23 15:29:37 2014
@@ -1833,9 +1833,21 @@ public class UserTestITCase extends Abst
         userMod.getResourcesToAdd().add(RESOURCE_NAME_WS1);
         userMod.getResourcesToAdd().add(RESOURCE_NAME_TESTDB);
         userTO = updateUser(userMod);
-        assertEquals(RESOURCE_NAME_WS1, userTO.getPropagationStatusTOs().get(1).getResource());
-        assertNotNull(userTO.getPropagationStatusTOs().get(1).getFailureReason());
-        assertEquals(PropagationTaskExecStatus.UNSUBMITTED, userTO.getPropagationStatusTOs().get(1).getStatus());
+        
+        List<PropagationStatus> propagationStatuses = userTO.getPropagationStatusTOs();
+        PropagationStatus ws1PropagationStatus = null;
+        if (propagationStatuses != null) {
+            for (PropagationStatus propStatus : propagationStatuses) {
+                if (RESOURCE_NAME_WS1.equals(propStatus.getResource())) {
+                    ws1PropagationStatus = propStatus;
+                    break;
+                }
+            }
+        }
+        assertNotNull(ws1PropagationStatus);
+        assertEquals(RESOURCE_NAME_WS1, ws1PropagationStatus.getResource());
+        assertNotNull(ws1PropagationStatus.getFailureReason());
+        assertEquals(PropagationTaskExecStatus.UNSUBMITTED, ws1PropagationStatus.getStatus());
     }
 
     @Test



Mime
View raw message