Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Extend Default Value for Final Deletion to 35 Days (#287)
Browse files Browse the repository at this point in the history
* fix: set final deletion day default
 - set default value from 28 to 33

* fix unit tests

* Increase Final Deletion days to 35

---------

Co-authored-by: Felix Dittrich <[email protected]>
Co-authored-by: Felix Dittrich <[email protected]>
  • Loading branch information
3 people authored Mar 31, 2023
1 parent 33d4fd1 commit 3e76f44
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class QuickTestConfig {
@Setter
public static class CancellationConfig {

private int finalDeletionDays = 28;
private int finalDeletionDays = 35;
private int completePendingTestsHours = 24;
private int readyToArchiveHours = 48;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ quicktest:
rules-server-url: ${QUICK_TEST_DCC_RULES_SERVER_URL}
environment-name: ${QUICK_TEST_ENVIRONMENT_NAME:unknown}
cancellation:
final-deletion-days: ${QUICK_TEST_CANCELLATION_FINAL_DELETION_DAYS:28}
final-deletion-days: ${QUICK_TEST_CANCELLATION_FINAL_DELETION_DAYS:35}
sharedRealms: ${QUICK_TEST_SHARED_REALMS}

archive:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ quicktest:
rules-server-url: https://distribution-6155b8d7d3c6.dcc-rules.de
environment-name: local
cancellation:
final-deletion-days: 28
final-deletion-days: 35
ready-to-archive-hours: 48
completePendingTestsHours: 24
final-delete-job:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void setUp() {

public static final ZonedDateTime CANCELLATION_DATE = ZonedDateTime.now().truncatedTo(ChronoUnit.MINUTES);

public static final ZonedDateTime FINAL_DELETION = CANCELLATION_DATE.plusWeeks(4);
public static final ZonedDateTime FINAL_DELETION = CANCELLATION_DATE.plusDays(35);
public static final ZonedDateTime NEW_STATE_DATE = ZonedDateTime.now().plusDays(10).truncatedTo(ChronoUnit.MINUTES);
public static final String PARTNER_ID = "P10000";
public static final String PARTNER_ID_UPDATE = "P10099";
Expand Down Expand Up @@ -309,7 +309,7 @@ void testFinalDeleteJob() {
cancellationService.finalDeleteJob();
archiveEntries = archiveService.getQuicktestsFromLongtermByTenantId(PARTNER_ID, 0, Integer.MAX_VALUE);
assertFalse(archiveEntries.isEmpty());
cancellation.setCancellationDate(ZonedDateTime.now().minusWeeks(4));
cancellation.setCancellationDate(ZonedDateTime.now().minusDays(35));
cancellationRepository.save(cancellation);
cancellationService.finalDeleteJob();
archiveEntries = archiveService.getQuicktestsFromLongtermByTenantId(PARTNER_ID, 0, Integer.MAX_VALUE);
Expand Down

0 comments on commit 3e76f44

Please sign in to comment.