Skip to content

amp-182 update timestamp#104

Merged
baranipek merged 4 commits intomainfrom
feat/amp-182-update-timestamp
Dec 31, 2025
Merged

amp-182 update timestamp#104
baranipek merged 4 commits intomainfrom
feat/amp-182-update-timestamp

Conversation

@baranipek
Copy link
Copy Markdown
Contributor

@baranipek baranipek requested a review from a team as a code owner December 31, 2025 08:03

import java.time.Instant;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown
Contributor

@coling01 coling01 Dec 31, 2025

Choose a reason for hiding this comment

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

would be nice to remove these wildcards as we continually improve but no worry

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

.message(responseStatusException.getReason() != null
? responseStatusException.getReason()
: responseStatusException.getMessage())
.timestamp(Instant.now())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good idea to test the time.
A better solution that Samir and I discussed is to use a clock server to allow us to inject a fixed time in Tests thus we can assert what the time response is exactly
Example here https://github.com/hmcts/service-hmcts-springboot-demo/tree/main/clock-demo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ClockService using offsetdate time

@baranipek baranipek merged commit 6d0880a into main Dec 31, 2025
11 checks passed
@baranipek baranipek deleted the feat/amp-182-update-timestamp branch December 31, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants