Skip to content

Commit

Permalink
Fix flaky test ScimUserEndpointsMockMvcTests.ShouldIgnoreAliasPropert…
Browse files Browse the repository at this point in the history
…ies.updateUser_ShouldIgnoreAliasProperties (#2804)
  • Loading branch information
adrianhoelzl-sap authored Mar 27, 2024
1 parent e63139e commit b294d21
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,12 @@ void createUser_ShouldIgnoreAliasProperties() throws Exception {

@Test
void updateUser_ShouldIgnoreAliasProperties() throws Exception {
final String email = "john.doe.%s@example.com".formatted(RandomStringUtils.randomAlphabetic(5));

// create user with empty alias properties
final ScimUser user = new ScimUser(null, "john.doe@example.com", "Joel", "D'sa");
final ScimUser user = new ScimUser(null, email, "Joel", "D'sa");
user.setPassword("password");
user.setPrimaryEmail("john.doe@example.com");
user.setPrimaryEmail(email);
user.setAliasId(null);
user.setAliasZid(null);
final ScimUser createdUser = createUser(user, scimReadWriteToken, null);
Expand Down Expand Up @@ -469,10 +471,12 @@ void updateUser_ShouldIgnoreAliasProperties() throws Exception {

@Test
void patchUser_ShouldIgnoreAliasProperties() throws Exception {
final String email = "john.doe.%s@example.com".formatted(RandomStringUtils.randomAlphabetic(5));

// create user with empty alias properties
final ScimUser user = new ScimUser(null, "john.doe@example.com", "Joel", "D'sa");
final ScimUser user = new ScimUser(null, email, "Joel", "D'sa");
user.setPassword("password");
user.setPrimaryEmail("john.doe@example.com");
user.setPrimaryEmail(email);
user.setAliasId(null);
user.setAliasZid(null);
final ScimUser createdUser = createUser(user, scimReadWriteToken, null);
Expand Down

0 comments on commit b294d21

Please sign in to comment.