Skip to content

Commit

Permalink
feat: make deletion routine more error tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Jul 19, 2024
1 parent f5ab90e commit ab7cfc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ private List<DeletionWorkflowError> performSessionDeletion(

Optional<Session> session = findSessionInUserSessionList(rcGroupId, userSessionList);

session.ifPresent(
s -> workflowErrors.addAll(deleteSessionService.performSessionDeletion(s)));
session.ifPresent(s -> workflowErrors.addAll(deleteSessionService.performSessionDeletion(s)));

return workflowErrors;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class DeleteInactiveSessionsAndUserServiceTest {
@Mock private InactivePrivateGroupsProvider inactivePrivateGroupsProvider;

@Test
void
deleteInactiveSessionsAndUsers_Should_SendWorkflowErrorsMail_When_userNotFoundReason() {
void deleteInactiveSessionsAndUsers_Should_SendWorkflowErrorsMail_When_userNotFoundReason() {

EasyRandom easyRandom = new EasyRandom();
User user = easyRandom.nextObject(User.class);
Expand Down Expand Up @@ -186,8 +185,7 @@ class DeleteInactiveSessionsAndUserServiceTest {
}

@Test
void
deleteInactiveSessionsAndUsers_Should_SendWorkflowErrorMail_WhenUserCouldNotBeFound() {
void deleteInactiveSessionsAndUsers_Should_SendWorkflowErrorMail_WhenUserCouldNotBeFound() {

EasyRandom easyRandom = new EasyRandom();
User user = easyRandom.nextObject(User.class);
Expand Down

0 comments on commit ab7cfc5

Please sign in to comment.