Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/test-fix-it #1138

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void singleRecipientDeceasedWithNewWorkflowActive() {

NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand Down Expand Up @@ -300,7 +300,7 @@ void singleRecipientDeceasedWithoutNewWorkflowActive() {

NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest01")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress)
.build();

Expand Down Expand Up @@ -416,7 +416,7 @@ void multiRecipientWithFirstAnalogOkAndSecondDeceased() {

NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest1")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand All @@ -426,7 +426,7 @@ void multiRecipientWithFirstAnalogOkAndSecondDeceased() {

NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest2")
.withTaxId("TAXID02")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress2)
.build();

Expand Down Expand Up @@ -577,7 +577,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();

NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
Expand All @@ -596,7 +596,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con

NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest2")
.withTaxId("TAXID02")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress2)
.build();

Expand Down Expand Up @@ -793,7 +793,7 @@ void multiRecipientWithBothRecipientsDeceased() {

NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest1")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand All @@ -803,7 +803,7 @@ void multiRecipientWithBothRecipientsDeceased() {

NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest2")
.withTaxId("TAXID02")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress2)
.build();

Expand Down Expand Up @@ -952,7 +952,7 @@ void multiRecipientWithFirstAnalogOkAndSecondDeceasedWhichVisualizesTheNotificat

NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest1")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_" + taxid01)
Expand Down Expand Up @@ -476,7 +476,7 @@ con invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) c

NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand Down Expand Up @@ -584,7 +584,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();

NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
Expand All @@ -601,7 +601,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid02 = "TAXID02";
String taxid02 = TestUtils.getTaxId();
NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid02)
.withInternalId("ANON_" + taxid02)
Expand Down Expand Up @@ -788,7 +788,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_" + taxid01)
Expand All @@ -804,7 +804,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid02 = "TAXID02";
String taxid02 = TestUtils.getTaxId();
NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid02)
.withInternalId("ANON_" + taxid02)
Expand Down Expand Up @@ -990,7 +990,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient1 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_" + taxid01)
Expand All @@ -1006,7 +1006,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxid02 = "TAXID02";
String taxid02 = TestUtils.getTaxId();
NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid02)
.withInternalId("ANON_" + taxid02)
Expand Down Expand Up @@ -1206,7 +1206,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.type(CourtesyDigitalAddressInt.COURTESY_DIGITAL_ADDRESS_TYPE_INT.EMAIL)
.build());

String taxId2 = "TAXID02";
String taxId2 = TestUtils.getTaxId();
NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId2)
.withInternalId("ANON_" + taxId2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void sendAnalogSuccessWithNormalizedAddress() {

String iun = TestUtils.getRandomIun();

String taxId = "test_tax_id";
String taxId = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId)
.withInternalId("ANON_"+taxId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CheckAttachmentRetentionIT extends CommonTestConfiguration {
void verifyCheckAttachmentAlreadyRefined() {
String iun = TestUtils.getRandomIun();

String taxId = "taxIdTest";
String taxId = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId)
.withInternalId("ANON_"+taxId)
Expand Down Expand Up @@ -123,7 +123,7 @@ void verifyCheckAttachmentAlreadyRefined() {
void verifyCheckAttachmentNotRefined() {
String iun = TestUtils.getRandomIun();

String taxId = "taxIdTest";
String taxId = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId)
.withInternalId("ANON_"+taxId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ public SpringTestConfiguration() {

@BeforeEach
public void setup() {
setDefaultTimeout(Duration.ofSeconds(60));
setDefaultTimeout(Duration.ofSeconds(120));
//setDefaultPollDelay(Duration.ofSeconds(20));
//setDefaultPollDelay(20, TimeUnit.SECONDS);
//setDefaultPollInterval(2, TimeUnit.SECONDS);


// Viene creato un oggetto Answer per ottenere l'istante corrente al momento della chiamata ...
Answer<Instant> answer = invocation -> Instant.now();
// e configurato Mockito per restituire l'istante corrente al momento della chiamata
Expand Down Expand Up @@ -289,7 +293,7 @@ private void setcCommonsConfigurationPropertiesForTest(PnDeliveryPushConfigs cfg
externalChannel.setDigitalCodesFatallog(Arrays.asList("C008", "C010"));
externalChannel.setDigitalRetryCount(-1);
externalChannel.setDigitalRetryDelay(Duration.ofMinutes(10));
externalChannel.setDigitalSendNoresponseTimeout(Duration.ofSeconds(50));
externalChannel.setDigitalSendNoresponseTimeout(Duration.ofHours(24));
Mockito.when(cfg.getExternalChannel()).thenReturn(externalChannel);

// Impostazione delle proprietà di retention degli allegati
Expand Down Expand Up @@ -323,6 +327,9 @@ private void setcCommonsConfigurationPropertiesForTest(PnDeliveryPushConfigs cfg
Mockito.when(cfg.getRaddExperimentationStoresName()).thenReturn(pnRaddExperimentationStore);

Mockito.when(cfg.getFeatureUnreachableRefinementPostAARStartDate()).thenReturn(Instant.parse("2024-11-27T00:00:00Z"));

Mockito.when(cfg.getPerformanceImprovementStartDate()).thenReturn("2024-06-01T00:00:00Z");
Mockito.when(cfg.getPerformanceImprovementEndDate()).thenReturn("2099-07-14T20:00:00Z");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void completeFailWithRegisteredLetter() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -475,7 +475,7 @@ void completeFailWithoutRegisteredLetter() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -634,7 +634,7 @@ void emptyFirstSuccessGeneral() {
.build();

NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.build();

String fileDoc = "sha256_doc00";
Expand Down Expand Up @@ -727,7 +727,7 @@ void emptyFirstSuccessSpecial() throws PnIdConflictException {
.build();

final NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withDigitalDomicile(digitalDomicile)
.build();

Expand Down Expand Up @@ -830,7 +830,7 @@ void firstSuccessGeneral() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
final NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -937,7 +937,7 @@ void firstSuccessPlatform() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -1033,7 +1033,7 @@ void firstSuccessSpecial() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -1144,7 +1144,7 @@ void secondSuccessGeneral() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -1287,7 +1287,7 @@ void secondSuccessPlatform() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down Expand Up @@ -1418,7 +1418,7 @@ void secondSuccessSpecial() {
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxid01 = "TAXID01";
String taxid01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxid01)
.withInternalId("ANON_"+taxid01)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ il terzo va a buon fine (valorizzando ExternalChannelMock.EXT_CHANNEL_WORKS is p
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxId01 = "TAXID01";
String taxId01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId01)
.withInternalId("ANON_"+taxId01)
Expand Down Expand Up @@ -228,7 +228,7 @@ il terzo va a buon fine (valorizzando ExternalChannelMock.EXT_CHANNEL_WORKS is p
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxId01 = "TAXID01";
String taxId01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId01)
.withInternalId("ANON_"+taxId01)
Expand Down Expand Up @@ -375,7 +375,7 @@ il terzo fallisce a sua volta (valorizzando ExternalChannelMock.EXT_CHANNEL_SEND
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxId01 = "TAXID01";
String taxId01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId01)
.withInternalId("ANON_"+taxId01)
Expand Down Expand Up @@ -539,7 +539,7 @@ il terzo fallisce a sua volta (valorizzando ExternalChannelMock.EXT_CHANNEL_SEND
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxId01 = "TAXID01";
String taxId01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId01)
.withInternalId("ANON_"+taxId01)
Expand Down Expand Up @@ -714,7 +714,7 @@ il terzo fallisce a sua volta (valorizzando ExternalChannelMock.EXT_CHANNEL_SEND
.type(LegalDigitalAddressInt.LEGAL_DIGITAL_ADDRESS_TYPE.PEC)
.build();

String taxId01 = "TAXID01";
String taxId01 = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId01)
.withInternalId("ANON_"+taxId01)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ e invio di una seconda notifica (all'indirizzo ottenuto dall'investigazione) con
.withAddress(ExternalChannelMock.EXT_CHANNEL_SEND_NEW_ADDR + ExternalChannelMock.EXTCHANNEL_SEND_FAIL + " Via Nuova")
.build();

String taxId = "TAXID01";
String taxId = TestUtils.getTaxId();
NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId)
.withInternalId("ANON_"+taxId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void testNotificationCancelledTwoRecipient(){
//Secondo recipient, solo cartaceo


String taxId02 = "TAXID02";
String taxId02 = TestUtils.getTaxId();
NotificationRecipientInt recipient2 = NotificationRecipientTestBuilder.builder()
.withTaxId(taxId02)
.withInternalId(taxId02 + "ANON")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void notificationViewedAfterRecipientDeceasedWorkflow() {

NotificationRecipientInt recipient = NotificationRecipientTestBuilder.builder()
.withInternalId("internalIdTest")
.withTaxId("TAXID01")
.withTaxId(TestUtils.getTaxId())
.withPhysicalAddress(paPhysicalAddress1)
.build();

Expand Down
Loading
Loading