You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/08/03 07:09:22 UTC
syncope git commit: Attempt to solve random failures with
PullTaskITCase#reconcileFromLDAP
Repository: syncope
Updated Branches:
refs/heads/master c633d95d1 -> 33fd24368
Attempt to solve random failures with PullTaskITCase#reconcileFromLDAP
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/33fd2436
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/33fd2436
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/33fd2436
Branch: refs/heads/master
Commit: 33fd24368f7d6d90b3534906ac3f51e43f909af2
Parents: c633d95
Author: Francesco Chicchiricc� <il...@apache.org>
Authored: Wed Aug 3 09:10:30 2016 +0200
Committer: Francesco Chicchiricc� <il...@apache.org>
Committed: Wed Aug 3 09:10:30 2016 +0200
----------------------------------------------------------------------
.../apache/syncope/fit/core/PullTaskITCase.java | 23 ++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/33fd2436/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
index 74f8b17..47a69cd 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
@@ -416,10 +416,25 @@ public class PullTaskITCase extends AbstractTaskITCase {
execProvisioningTask(taskService, "1e419ca4-ea81-4493-a14f-28b90113686d", 50, false);
// 4. verify that LDAP group membership is propagated as Syncope membership
- PagedResult<UserTO> members = userService.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).
- fiql(SyncopeClient.getUserSearchConditionBuilder().inGroups(groupTO.getKey()).query()).
- build());
- assertNotNull(members);
+ int i = 0;
+ int maxit = 50;
+ PagedResult<UserTO> members;
+ do {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ }
+
+ members = userService.search(new AnyQuery.Builder().realm(SyncopeConstants.ROOT_REALM).
+ fiql(SyncopeClient.getUserSearchConditionBuilder().inGroups(groupTO.getKey()).query()).
+ build());
+ assertNotNull(members);
+
+ i++;
+ } while (members.getResult().isEmpty() && i < maxit);
+ if (i == maxit) {
+ fail("Timeout while checking for memberships of " + groupTO.getName());
+ }
assertEquals(1, members.getResult().size());
}