From 3e76f442e1424d719c8bcec98d827acc35c081cc Mon Sep 17 00:00:00 2001 From: Andreas Scheibal Date: Fri, 31 Mar 2023 11:36:57 +0200 Subject: [PATCH] Extend Default Value for Final Deletion to 35 Days (#287) * 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 Co-authored-by: Felix Dittrich <31076102+f11h@users.noreply.github.com> --- .../java/app/coronawarn/quicktest/config/QuickTestConfig.java | 2 +- src/main/resources/application-cloud.yml | 2 +- src/main/resources/application.yml | 2 +- .../coronawarn/quicktest/service/CancellationServiceTest.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/app/coronawarn/quicktest/config/QuickTestConfig.java b/src/main/java/app/coronawarn/quicktest/config/QuickTestConfig.java index 9c9f05ac..629959f4 100644 --- a/src/main/java/app/coronawarn/quicktest/config/QuickTestConfig.java +++ b/src/main/java/app/coronawarn/quicktest/config/QuickTestConfig.java @@ -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; diff --git a/src/main/resources/application-cloud.yml b/src/main/resources/application-cloud.yml index 3abc4c70..6b7ea2e1 100644 --- a/src/main/resources/application-cloud.yml +++ b/src/main/resources/application-cloud.yml @@ -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: diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 785ea84f..3ed25560 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -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: diff --git a/src/test/java/app/coronawarn/quicktest/service/CancellationServiceTest.java b/src/test/java/app/coronawarn/quicktest/service/CancellationServiceTest.java index 55ec19ac..82c3a744 100644 --- a/src/test/java/app/coronawarn/quicktest/service/CancellationServiceTest.java +++ b/src/test/java/app/coronawarn/quicktest/service/CancellationServiceTest.java @@ -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"; @@ -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);