Skip to content

Commit

Permalink
ES-2475: Wrap create RBAC role request in retry
Browse files Browse the repository at this point in the history
  • Loading branch information
tlawson3 committed Jun 25, 2024
1 parent 7a06fbc commit 03ca830
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ class RoleAndPermissionsCreator(val restClient: CordaRestClient) {
return existingRole
}

val createRoleResponse = restClient.rbacRoleClient.postRole(roleToCreate)
val createRoleResponse = executeWithRetry(
waitDuration = wait,
operationName = "Create role '${roleToCreate.roleName}'"
) {
restClient.rbacRoleClient.postRole(roleToCreate)
}
executeWithRetry(
waitDuration = wait,
operationName = "Wait until role '${createRoleResponse.id}' is created"
Expand Down

0 comments on commit 03ca830

Please sign in to comment.