We observe that from time to time the createUser fails randomly.
Mainly it fails to get the created user path in getAuthorizableNodeWithRetry as seen below in the stack trace.
While debugging, the user is created but the code logic that do this retry seems to be wrong or not waiting long enough (happening more often on cloud AEM).
[ForkJoinPool-1-worker-0] ERROR com.adobe.cq.sites.testing.utils.TestContentBuilder - Authorizable testCopyPageToSameFolderWithNewLabelAsAdmin_PWmMZrkw not found!
org.apache.sling.testing.clients.ClientException: Authorizable testCopyPageToSameFolderWithNewLabelAsAdmin_PWmMZrkw not found!
at com.adobe.cq.testing.client.security.AbstractAuthorizable.getAuthorizableNodeWithRetry(AbstractAuthorizable.java:270)
at com.adobe.cq.testing.client.security.AbstractAuthorizable.getAuthorizablePath(AbstractAuthorizable.java:225)
at com.adobe.cq.testing.client.security.AbstractAuthorizable.(AbstractAuthorizable.java:82)
at com.adobe.cq.testing.client.security.User.(User.java:56)
at com.adobe.cq.testing.client.security.User.createUser(User.java:217)
at com.adobe.cq.testing.client.SecurityClient.createUser(SecurityClient.java:169)
What seems wrong is that it need to poll to know the created user path, shouldn't the endpoint used to create the user returning the path of the created user in the response ?
We observe that from time to time the createUser fails randomly.
Mainly it fails to get the created user path in getAuthorizableNodeWithRetry as seen below in the stack trace.
While debugging, the user is created but the code logic that do this retry seems to be wrong or not waiting long enough (happening more often on cloud AEM).
[ForkJoinPool-1-worker-0] ERROR com.adobe.cq.sites.testing.utils.TestContentBuilder - Authorizable testCopyPageToSameFolderWithNewLabelAsAdmin_PWmMZrkw not found!
org.apache.sling.testing.clients.ClientException: Authorizable testCopyPageToSameFolderWithNewLabelAsAdmin_PWmMZrkw not found!
at com.adobe.cq.testing.client.security.AbstractAuthorizable.getAuthorizableNodeWithRetry(AbstractAuthorizable.java:270)
at com.adobe.cq.testing.client.security.AbstractAuthorizable.getAuthorizablePath(AbstractAuthorizable.java:225)
at com.adobe.cq.testing.client.security.AbstractAuthorizable.(AbstractAuthorizable.java:82)
at com.adobe.cq.testing.client.security.User.(User.java:56)
at com.adobe.cq.testing.client.security.User.createUser(User.java:217)
at com.adobe.cq.testing.client.SecurityClient.createUser(SecurityClient.java:169)
What seems wrong is that it need to poll to know the created user path, shouldn't the endpoint used to create the user returning the path of the created user in the response ?