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

[AB2D-6147] increase ab2d-events-client coverage #399

Merged
merged 12 commits into from
Jun 26, 2024
Merged

Conversation

coilysiren
Copy link
Contributor

@coilysiren coilysiren commented Jun 26, 2024

🎫 Ticket

https://jira.cms.gov/browse/AB2D-6147

🛠 Changes

A very long and repetitious PR for testing LoggableEvent. 80% of the diff is testing the extremely long equals function, in such a way that hits every single possible case. While doing this I hit a null pointer exception (on the date handling), so I added a line of code to fix that.

ℹ️ Context

This is a part of my journey towards 90% code coverage

@@ -121,7 +121,7 @@ public boolean equals(final Object o) {
if (otherTimeOfEvent != null) {
return false;
}
} else if (thisTimeOfEvent.toEpochSecond() != otherTimeOfEvent.toEpochSecond()) {
} else if (otherTimeOfEvent == null || thisTimeOfEvent.toEpochSecond() != otherTimeOfEvent.toEpochSecond()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found this missing null check when writing the tests

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you plan to increase library version? may be later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, thanks for catching that @smirnovaae! I forgot that part. I'll do it in another PR.

@coilysiren coilysiren marked this pull request as ready for review June 26, 2024 19:09
@coilysiren coilysiren requested a review from a team as a code owner June 26, 2024 19:09
Copy link
Contributor

@Rwolfe-Nava Rwolfe-Nava left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@coilysiren coilysiren merged commit 148f349 into main Jun 26, 2024
3 checks passed
@coilysiren coilysiren deleted the AB2D-6147-p2 branch June 26, 2024 22:44
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.

None yet

3 participants