Skip to content

Adding additional log coverage#1503

Merged
ORybak5 merged 5 commits into
mainfrom
increasing-log-coverage4
Jul 6, 2026
Merged

Adding additional log coverage#1503
ORybak5 merged 5 commits into
mainfrom
increasing-log-coverage4

Conversation

@ORybak5

@ORybak5 ORybak5 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Adding additional log coverage

Why

Log coverage is an essential part of the application and helps to investigate different issues and cases.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Internal change (non-breaking change with no effect on the functionality affecting end users)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the Changelog with details of my change in the UNRELEASED section if this change will affect end users

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Looks good. All 22 mutations in this change were killed.

class surviving killed
💯uk.nhs.adaptors.gp2gp.gpc.GpcClient 0 17
💯uk.nhs.adaptors.gp2gp.gpc.builder.GpcRequestBuilder 0 5

See https://pitest.org

@ORybak5 ORybak5 marked this pull request as ready for review July 6, 2026 15:03
@ORybak5 ORybak5 requested a review from a team as a code owner July 6, 2026 15:03
logRequest(STRUCTURED_LOG_TEMPLATE, structuredTaskDefinition,
gpcConfiguration.getUrl() + gpcConfiguration.getMigrateStructuredEndpoint());

long startTime = System.currentTimeMillis();

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.

random Q but why do we use long here?

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.

Miliseconds quite be quite long hence safer to declare them as "long" rather than as "int".

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

main reason is:

This method returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC(coordinated universal time). - Thats a pretty big number so the method returns long as int has a max value of 2147483647

@ORybak5 ORybak5 merged commit 7d166f3 into main Jul 6, 2026
13 checks passed
@ORybak5 ORybak5 deleted the increasing-log-coverage4 branch July 6, 2026 15:18
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.

3 participants