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

LAU-1008 unit and integration test #697

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

priyankaVerma21
Copy link
Contributor

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/LAU-1008

Change description

Remote Deletion Exception

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

@hmcts-jenkins-a-to-c hmcts-jenkins-a-to-c bot deployed to preview December 5, 2024 11:28 Active
@@ -209,4 +213,93 @@ void testShouldLogErrorWhenDeleteLinkedCasesFails() {
verify(failedToDeleteCaseFamilyHolder, times(2)).addCaseFamily(defaultCaseFamily);
verifyNoMoreInteractions(caseLinkRepository);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not verifying if the following lines are not executed.
caseEventRepository.deleteByCaseDataId(caseData.getId()); caseDataRepository.delete(caseDataEntity.get());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been added to all unit test

@@ -520,6 +520,45 @@ protected static Stream<Arguments> provideCaseDeletionScenarios() {
1504259907351231L, 1504259907351230L,
1504259907351229L)),
Map.of("FT_MasterCaseType", List.of(1504259907351234L,1504259907351228L))
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add LAU scenario too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once log and audit exception is thrown , it will throw the exception to higher level and deletion will stop there. It's difficult to add Log and audit exception Integration test

@hmcts-jenkins-a-to-c hmcts-jenkins-a-to-c bot deployed to preview December 5, 2024 14:38 Active
@hmcts-jenkins-a-to-c hmcts-jenkins-a-to-c bot deployed to preview December 6, 2024 09:43 Active
@priyankaVerma21 priyankaVerma21 merged commit b711265 into master Dec 6, 2024
6 checks passed
@priyankaVerma21 priyankaVerma21 deleted the lau-1008-unit-integration-test branch December 6, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants