-
Notifications
You must be signed in to change notification settings - Fork 2
DTSPB-4663 fix CCD Concurrency in SS #1227
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
Open
MarcusHMCTS
wants to merge
21
commits into
master
Choose a base branch
from
DTSPB-4663_Fix-CCD-concurrency-issue-in-Submit-service
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4168386
DTSPB-4663 fix CCD Concurrency in SS
MarcusHMCTS 423ca88
DTSPB-4663 fix Integration Tests
MarcusHMCTS 56f20ce
DTSPB-4663 fix SubmitServiceImplTest
MarcusHMCTS 43513a3
DTSPB-4663 fix SubmitServiceImplTest
MarcusHMCTS 52103f9
DTSPB-4663 fix SubmitServiceImplTest typo style
MarcusHMCTS 07ff449
DTSPB-4663 fix FormsFunctionalTests.java shouldSaveFormSuccessfully
MarcusHMCTS 4b2bfc6
Merge branch 'master' into DTSPB-4663_Fix-CCD-concurrency-issue-in-Su…
MarcusHMCTS 072c3e7
DTSPB-4663 add debug log
MarcusHMCTS 728d493
DTSPB-4663 add debug log
MarcusHMCTS ab803fe
DTSPB-4663 pointing to ss pr-1092
MarcusHMCTS b931519
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] f794b87
DTSPB-4663 fix history typo error for /cases/initiate
MarcusHMCTS 32e007c
Merge remote-tracking branch 'origin/DTSPB-4663_Fix-CCD-concurrency-i…
MarcusHMCTS eb979d0
Merge branch 'master' into DTSPB-4663_Fix-CCD-concurrency-issue-in-Su…
MarcusHMCTS 8633e98
DTSPB-4663 fix history typo error for /cases/initiate
MarcusHMCTS 9764d4d
fix typo
FeliTam 8675c83
Merge branch 'master' into DTSPB-4663_Fix-CCD-concurrency-issue-in-Su…
MarcusHMCTS c8c93ce
DTSPB-4663 update probate commons to 2.1.2
MarcusHMCTS 1cb9e80
DTSPB-4663 update probate commons to 2.1.3
MarcusHMCTS 11a5e10
DTSPB-4663 add lastModifiedDateTime to InvitationResult
MarcusHMCTS 9f089cc
DTSPB-4663 fix IT Test
MarcusHMCTS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||
| import uk.gov.hmcts.reform.probate.model.PaymentStatus; | ||||||
| import uk.gov.hmcts.reform.probate.model.ProbateType; | ||||||
| import uk.gov.hmcts.reform.probate.model.cases.CaseData; | ||||||
| import uk.gov.hmcts.reform.probate.model.cases.CaseInfo; | ||||||
| import uk.gov.hmcts.reform.probate.model.cases.CasePayment; | ||||||
| import uk.gov.hmcts.reform.probate.model.cases.CaseType; | ||||||
| import uk.gov.hmcts.reform.probate.model.cases.CollectionMember; | ||||||
|
|
@@ -30,6 +31,7 @@ | |||||
| import uk.gov.hmcts.reform.probate.model.forms.pa.PaForm; | ||||||
| import uk.gov.hmcts.reform.probate.model.payments.PaymentDto; | ||||||
|
|
||||||
| import java.time.LocalDateTime; | ||||||
| import java.util.Arrays; | ||||||
| import java.util.Comparator; | ||||||
| import java.util.List; | ||||||
|
|
@@ -149,16 +151,19 @@ private Form initiateForm(ProbateType probateType) { | |||||
|
|
||||||
|
|
||||||
| @Override | ||||||
| public Form saveCase(String identifier, Form form) { | ||||||
| log.info("Save case called"); | ||||||
| public Form saveCase(String identifier, LocalDateTime lastModefiedDateTime, Form form) { | ||||||
|
||||||
| public Form saveCase(String identifier, LocalDateTime lastModefiedDateTime, Form form) { | |
| public Form saveCase(String identifier, LocalDateTime lastModifiedDateTime, Form form) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| package uk.gov.hmcts.probate.core.service; | ||
|
|
||
| import com.fasterxml.jackson.databind.ObjectMapper; | ||
| import com.fasterxml.jackson.databind.SerializationFeature; | ||
| import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; | ||
| import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; | ||
| import com.google.common.collect.ImmutableMap; | ||
| import com.google.common.collect.Lists; | ||
| import org.junit.jupiter.api.Assertions; | ||
|
|
@@ -40,6 +43,7 @@ | |
|
|
||
| import java.math.BigDecimal; | ||
| import java.time.LocalDate; | ||
| import java.time.LocalDateTime; | ||
| import java.time.ZoneId; | ||
| import java.util.ArrayList; | ||
| import java.util.Arrays; | ||
|
|
@@ -71,6 +75,7 @@ public class SubmitServiceImplTest { | |
| private static final CaseState STATE = CaseState.DRAFT; | ||
| private static final String CAVEAT_IDENTIFIER = "Id"; | ||
| private static final String CAVEAT_EXPIRY_DATE = "2020-12-31"; | ||
| private static final LocalDateTime LAST_MODIFIED_DATE_TIME = LocalDateTime.of(2019, 1, 1, 0, 0, 0); | ||
| private Map<ProbateType, FormMapper> mappers; | ||
|
|
||
| @Mock | ||
|
|
@@ -132,6 +137,9 @@ public void setUp() throws Exception { | |
| when(securityUtils.getServiceAuthorisation()).thenReturn(SERVICE_AUTHORIZATION); | ||
| caseInfo = CaseInfo.builder().state(STATE).caseId(CASE_ID).build(); | ||
|
|
||
| objectMapper.registerModule(new Jdk8Module()); | ||
| objectMapper.registerModule(new JavaTimeModule()); | ||
| objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); | ||
| // Intestacy setup | ||
| String intestacyFormStr = TestUtils.getJsonFromFile("intestacyFormTest.json"); | ||
| intestacyForm = objectMapper.readValue(intestacyFormStr, IntestacyForm.class); | ||
|
|
@@ -253,7 +261,7 @@ private void shouldSaveDraftForm(Form form, ProbateCaseDetails caseDetails, Stri | |
| when(submitServiceApi.saveCase(eq(AUTHORIZATION), eq(SERVICE_AUTHORIZATION), | ||
| eq(identifier),eq("event description"), any(ProbateCaseDetails.class))).thenReturn(caseDetails); | ||
|
|
||
| Form formResponse = submitService.saveCase(identifier, form); | ||
| Form formResponse = submitService.saveCase(identifier, LAST_MODIFIED_DATE_TIME, form); | ||
|
|
||
| assertThat(formResponse, is(form)); | ||
| verify(submitServiceApi, times(1)).saveCase(eq(AUTHORIZATION), eq(SERVICE_AUTHORIZATION), | ||
|
|
@@ -272,7 +280,7 @@ public void shouldThrowErrorOnSaveDraftIfEmailAddressDoesNotMatchForm() { | |
| ((CaveatForm) caveatForm).setApplicationId("[email protected]"); | ||
|
|
||
| Assertions.assertThrows(IllegalArgumentException.class, () -> { | ||
| submitService.saveCase(EMAIL_ADDRESS, caveatForm); | ||
| submitService.saveCase(EMAIL_ADDRESS, LAST_MODIFIED_DATE_TIME, caveatForm); | ||
| }); | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downgrade? (&
piTestat l173?)