This is an automated email from the ASF dual-hosted git repository.
baedke pushed a commit to branch issues/oak-10379-2
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/issues/oak-10379-2 by this
push:
new 3cc90c0c15 OAK-10379: DynamicGroupsTest#testCrossIDPMembership() fails
occasionally
3cc90c0c15 is described below
commit 3cc90c0c15c435a193363baf6b08387376302783
Author: Manfred Baedke <[email protected]>
AuthorDate: Wed Aug 9 11:01:45 2023 +0200
OAK-10379: DynamicGroupsTest#testCrossIDPMembership() fails occasionally
Fixed timing issue.
---
.../security/authentication/external/impl/AbstractDynamicTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/AbstractDynamicTest.java
b/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/AbstractDynamicTest.java
index e13a7b1657..4190916655 100644
---
a/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/AbstractDynamicTest.java
+++
b/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/AbstractDynamicTest.java
@@ -57,9 +57,15 @@ public abstract class AbstractDynamicTest extends
AbstractExternalAuthTest {
createAutoMembershipGroups();
previouslySyncedUser = syncPriorToDynamicMembership();
+ long now = System.currentTimeMillis();
userManager = getUserManager(r);
valueFactory = getValueFactory(r);
+
+ while (now == System.currentTimeMillis()) {
+ // Wait to ensure that the internal timestamp of the
DynamicSyncContext is ahead of the last sync time (OAK-10379)
+ }
+
syncContext = new DynamicSyncContext(syncConfig, idp, userManager,
valueFactory);
// inject user-configuration as well as sync-handler and
sync-hander-mapping to have get dynamic-membership