Closes #2506 - fix deleting DELETED history events by the cleanup job
This commit is contained in:
parent
ac33df25c6
commit
8593221537
|
@ -72,7 +72,8 @@ public class HistoryCleanupJob extends AbstractTaskanaJob {
|
||||||
.eventTypeIn(
|
.eventTypeIn(
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
TaskHistoryEventType.CANCELLED.getName(),
|
TaskHistoryEventType.CANCELLED.getName(),
|
||||||
TaskHistoryEventType.TERMINATED.getName())
|
TaskHistoryEventType.TERMINATED.getName(),
|
||||||
|
TaskHistoryEventType.DELETED.getName())
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
Set<String> taskIdsToDeleteHistoryEventsFor;
|
Set<String> taskIdsToDeleteHistoryEventsFor;
|
||||||
|
|
|
@ -65,10 +65,8 @@ class HistoryCleanupJobAccTest {
|
||||||
void should_NotCleanHistoryEventsUntilDate_When_MinimumAgeNotReached() throws Exception {
|
void should_NotCleanHistoryEventsUntilDate_When_MinimumAgeNotReached() throws Exception {
|
||||||
TaskHistoryEvent eventToBeCleaned =
|
TaskHistoryEvent eventToBeCleaned =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -76,10 +74,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned);
|
historyService.create(eventToBeCleaned);
|
||||||
TaskHistoryEvent eventToBeCleaned2 =
|
TaskHistoryEvent eventToBeCleaned2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(5, ChronoUnit.DAYS),
|
Instant.now().minus(5, ChronoUnit.DAYS),
|
||||||
|
@ -93,10 +89,8 @@ class HistoryCleanupJobAccTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private TaskHistoryEvent createTaskHistoryEvent(
|
private TaskHistoryEvent createTaskHistoryEvent(
|
||||||
String workbasketKey,
|
|
||||||
String taskId,
|
String taskId,
|
||||||
String type,
|
String type,
|
||||||
String previousWorkbasketId,
|
|
||||||
String userid,
|
String userid,
|
||||||
String details,
|
String details,
|
||||||
Instant created,
|
Instant created,
|
||||||
|
@ -105,10 +99,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyEvent.setId(IdGenerator.generateWithPrefix(IdGenerator.ID_PREFIX_TASK_HISTORY_EVENT));
|
historyEvent.setId(IdGenerator.generateWithPrefix(IdGenerator.ID_PREFIX_TASK_HISTORY_EVENT));
|
||||||
historyEvent.setUserId(userid);
|
historyEvent.setUserId(userid);
|
||||||
historyEvent.setDetails(details);
|
historyEvent.setDetails(details);
|
||||||
historyEvent.setWorkbasketKey(workbasketKey);
|
|
||||||
historyEvent.setTaskId(taskId);
|
historyEvent.setTaskId(taskId);
|
||||||
historyEvent.setEventType(type);
|
historyEvent.setEventType(type);
|
||||||
historyEvent.setOldValue(previousWorkbasketId);
|
|
||||||
historyEvent.setCreated(created);
|
historyEvent.setCreated(created);
|
||||||
historyEvent.setParentBusinessProcessId(parentBusinessProcessId);
|
historyEvent.setParentBusinessProcessId(parentBusinessProcessId);
|
||||||
return historyEvent;
|
return historyEvent;
|
||||||
|
@ -140,10 +132,8 @@ class HistoryCleanupJobAccTest {
|
||||||
|
|
||||||
TaskHistoryEvent eventToBeCleaned =
|
TaskHistoryEvent eventToBeCleaned =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -151,10 +141,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned);
|
historyService.create(eventToBeCleaned);
|
||||||
TaskHistoryEvent eventToBeCleaned2 =
|
TaskHistoryEvent eventToBeCleaned2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -162,10 +150,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned2);
|
historyService.create(eventToBeCleaned2);
|
||||||
TaskHistoryEvent eventToBeCleaned3 =
|
TaskHistoryEvent eventToBeCleaned3 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -173,16 +159,31 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned3);
|
historyService.create(eventToBeCleaned3);
|
||||||
TaskHistoryEvent eventToBeCleaned4 =
|
TaskHistoryEvent eventToBeCleaned4 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CANCELLED.getName(),
|
TaskHistoryEventType.CANCELLED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
"sameParentId");
|
"sameParentId");
|
||||||
historyService.create(eventToBeCleaned4);
|
historyService.create(eventToBeCleaned4);
|
||||||
|
TaskHistoryEvent eventToBeCleaned5 =
|
||||||
|
createTaskHistoryEvent(
|
||||||
|
"taskId3",
|
||||||
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
|
"someUserId",
|
||||||
|
"someDetails",
|
||||||
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
"sameParentId");
|
||||||
|
historyService.create(eventToBeCleaned5);
|
||||||
|
TaskHistoryEvent eventToBeCleaned6 =
|
||||||
|
createTaskHistoryEvent(
|
||||||
|
"taskId3",
|
||||||
|
TaskHistoryEventType.DELETED.getName(),
|
||||||
|
"someUserId",
|
||||||
|
"someDetails",
|
||||||
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
"sameParentId");
|
||||||
|
historyService.create(eventToBeCleaned6);
|
||||||
HistoryCleanupJob job = new HistoryCleanupJob(taskanaEngine, null, null);
|
HistoryCleanupJob job = new HistoryCleanupJob(taskanaEngine, null, null);
|
||||||
job.run();
|
job.run();
|
||||||
|
|
||||||
|
@ -193,13 +194,10 @@ class HistoryCleanupJobAccTest {
|
||||||
@WithAccessId(user = "admin")
|
@WithAccessId(user = "admin")
|
||||||
void should_NotCleanHistoryEvents_When_SameParentBusinessTrueAndActiveTaskInParentBusiness()
|
void should_NotCleanHistoryEvents_When_SameParentBusinessTrueAndActiveTaskInParentBusiness()
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
TaskHistoryEvent eventToBeCleaned =
|
TaskHistoryEvent eventToBeCleaned =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -207,10 +205,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned);
|
historyService.create(eventToBeCleaned);
|
||||||
TaskHistoryEvent eventToBeCleaned2 =
|
TaskHistoryEvent eventToBeCleaned2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -218,10 +214,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned2);
|
historyService.create(eventToBeCleaned2);
|
||||||
TaskHistoryEvent eventToBeCleaned3 =
|
TaskHistoryEvent eventToBeCleaned3 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(1, ChronoUnit.DAYS),
|
Instant.now().minus(1, ChronoUnit.DAYS),
|
||||||
|
@ -241,10 +235,8 @@ class HistoryCleanupJobAccTest {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
TaskHistoryEvent eventToBeCleaned =
|
TaskHistoryEvent eventToBeCleaned =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -252,10 +244,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned);
|
historyService.create(eventToBeCleaned);
|
||||||
TaskHistoryEvent eventToBeCleaned2 =
|
TaskHistoryEvent eventToBeCleaned2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -263,10 +253,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned2);
|
historyService.create(eventToBeCleaned2);
|
||||||
TaskHistoryEvent eventToBeCleaned3 =
|
TaskHistoryEvent eventToBeCleaned3 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(3, ChronoUnit.DAYS),
|
Instant.now().minus(3, ChronoUnit.DAYS),
|
||||||
|
@ -274,10 +262,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(eventToBeCleaned3);
|
historyService.create(eventToBeCleaned3);
|
||||||
TaskHistoryEvent eventToBeCleaned4 =
|
TaskHistoryEvent eventToBeCleaned4 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CANCELLED.getName(),
|
TaskHistoryEventType.CANCELLED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(5, ChronoUnit.DAYS),
|
Instant.now().minus(5, ChronoUnit.DAYS),
|
||||||
|
@ -296,10 +282,8 @@ class HistoryCleanupJobAccTest {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
TaskHistoryEvent toBeIgnored1 =
|
TaskHistoryEvent toBeIgnored1 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CANCELLED.getName(),
|
TaskHistoryEventType.CANCELLED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -307,10 +291,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(toBeIgnored1);
|
historyService.create(toBeIgnored1);
|
||||||
TaskHistoryEvent toBeIgnored2 =
|
TaskHistoryEvent toBeIgnored2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -318,10 +300,8 @@ class HistoryCleanupJobAccTest {
|
||||||
historyService.create(toBeIgnored2);
|
historyService.create(toBeIgnored2);
|
||||||
TaskHistoryEvent toBeIgnored3 =
|
TaskHistoryEvent toBeIgnored3 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId3",
|
"taskId3",
|
||||||
TaskHistoryEventType.TERMINATED.getName(),
|
TaskHistoryEventType.TERMINATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -355,10 +335,10 @@ class HistoryCleanupJobAccTest {
|
||||||
.map(
|
.map(
|
||||||
pair ->
|
pair ->
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
pair.getLeft(),
|
pair.getLeft(),
|
||||||
pair.getRight().getName(),
|
pair.getRight().getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
@ -406,49 +386,58 @@ class HistoryCleanupJobAccTest {
|
||||||
void should_CleanHistoryEventsUntilDate_When_SameParentBusinessFalse() throws Exception {
|
void should_CleanHistoryEventsUntilDate_When_SameParentBusinessFalse() throws Exception {
|
||||||
TaskHistoryEvent eventToBeCleaned =
|
TaskHistoryEvent eventToBeCleaned =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
"sameParentId");
|
"someParentId1");
|
||||||
historyService.create(eventToBeCleaned);
|
historyService.create(eventToBeCleaned);
|
||||||
TaskHistoryEvent eventToBeCleaned2 =
|
TaskHistoryEvent eventToBeCleaned2 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId1",
|
"taskId1",
|
||||||
TaskHistoryEventType.COMPLETED.getName(),
|
TaskHistoryEventType.COMPLETED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
"sameParentId");
|
"someParentId1");
|
||||||
historyService.create(eventToBeCleaned2);
|
historyService.create(eventToBeCleaned2);
|
||||||
TaskHistoryEvent eventToBeCleaned3 =
|
TaskHistoryEvent eventToBeCleaned3 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.CREATED.getName(),
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(20, ChronoUnit.DAYS),
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
"sameParentId");
|
"someParentId2");
|
||||||
historyService.create(eventToBeCleaned3);
|
historyService.create(eventToBeCleaned3);
|
||||||
TaskHistoryEvent eventToBeCleaned4 =
|
TaskHistoryEvent eventToBeCleaned4 =
|
||||||
createTaskHistoryEvent(
|
createTaskHistoryEvent(
|
||||||
"wbKey1",
|
|
||||||
"taskId2",
|
"taskId2",
|
||||||
TaskHistoryEventType.TERMINATED.getName(),
|
TaskHistoryEventType.TERMINATED.getName(),
|
||||||
"wbKey2",
|
|
||||||
"someUserId",
|
"someUserId",
|
||||||
"someDetails",
|
"someDetails",
|
||||||
Instant.now().minus(5, ChronoUnit.DAYS),
|
Instant.now().minus(5, ChronoUnit.DAYS),
|
||||||
"sameParentId");
|
"someParentId2");
|
||||||
historyService.create(eventToBeCleaned4);
|
historyService.create(eventToBeCleaned4);
|
||||||
|
TaskHistoryEvent eventToBeCleaned5 =
|
||||||
|
createTaskHistoryEvent(
|
||||||
|
"taskId3",
|
||||||
|
TaskHistoryEventType.CREATED.getName(),
|
||||||
|
"someUserId",
|
||||||
|
"someDetails",
|
||||||
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
"someParentId3");
|
||||||
|
historyService.create(eventToBeCleaned5);
|
||||||
|
TaskHistoryEvent eventToBeCleaned6 =
|
||||||
|
createTaskHistoryEvent(
|
||||||
|
"taskId3",
|
||||||
|
TaskHistoryEventType.DELETED.getName(),
|
||||||
|
"someUserId",
|
||||||
|
"someDetails",
|
||||||
|
Instant.now().minus(20, ChronoUnit.DAYS),
|
||||||
|
"someParentId3");
|
||||||
|
historyService.create(eventToBeCleaned6);
|
||||||
HistoryCleanupJob job = new HistoryCleanupJob(taskanaEngine, null, null);
|
HistoryCleanupJob job = new HistoryCleanupJob(taskanaEngine, null, null);
|
||||||
job.run();
|
job.run();
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class DeleteTaskCommentAccTest {
|
||||||
taskService.deleteTaskComment(comment1.getId());
|
taskService.deleteTaskComment(comment1.getId());
|
||||||
|
|
||||||
List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
|
List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
|
||||||
assertThat(taskCommentsAfterDeletion).hasSize(0);
|
assertThat(taskCommentsAfterDeletion).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithAccessId(user = "user-1-2", groups = "user-1-1")
|
@WithAccessId(user = "user-1-2", groups = "user-1-1")
|
||||||
|
@ -129,7 +129,7 @@ class DeleteTaskCommentAccTest {
|
||||||
});
|
});
|
||||||
List<TaskComment> taskCommentsAfterDeletionWithAdmin =
|
List<TaskComment> taskCommentsAfterDeletionWithAdmin =
|
||||||
taskService.getTaskComments(task1.getId());
|
taskService.getTaskComments(task1.getId());
|
||||||
assertThat(taskCommentsAfterDeletionWithAdmin).hasSize(0);
|
assertThat(taskCommentsAfterDeletionWithAdmin).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithAccessId(user = "admin")
|
@WithAccessId(user = "admin")
|
||||||
|
@ -146,7 +146,7 @@ class DeleteTaskCommentAccTest {
|
||||||
taskService.deleteTaskComment(comment1.getId());
|
taskService.deleteTaskComment(comment1.getId());
|
||||||
|
|
||||||
List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
|
List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
|
||||||
assertThat(taskCommentsAfterDeletion).hasSize(0);
|
assertThat(taskCommentsAfterDeletion).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithAccessId(user = "user-1-1")
|
@WithAccessId(user = "user-1-1")
|
||||||
|
|
Loading…
Reference in New Issue