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

Add check for not valid constraints #382

Closed
wants to merge 6 commits into from
Closed

Conversation

BLoHny
Copy link
Collaborator

@BLoHny BLoHny commented Apr 30, 2024

original: #374
Relates to #362

Copy link
Owner

@mfvanek mfvanek left a comment

Choose a reason for hiding this comment

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

Good job! Just need to polish

Copy link
Owner

@mfvanek mfvanek left a comment

Choose a reason for hiding this comment

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

There are failed tests 352 tests completed, 13 failed
and issues with code coverage

* What went wrong:
Execution failed for task ':pg-index-health-model:jacocoTestCoverageVerification'.
> Rule violated for bundle pg-index-health-model: classes missed count is 2.0, but expected maximum is 0.0
  Rule violated for bundle pg-index-health-model: methods missed count is 13.0, but expected maximum is 0.0
  Rule violated for bundle pg-index-health-model: lines missed count is 30.0, but expected maximum is 0.0
  Rule violated for bundle pg-index-health-model: instructions covered ratio is 0.9, but expected minimum is 1.0
  Rule violated for bundle pg-index-health-model: branches covered ratio is 0.8, but expected minimum is 1.0

@BLoHny
Copy link
Collaborator Author

BLoHny commented May 1, 2024

Even though I filled the test coverage of the newly created class to 100% and corrected other test errors, the coverage is not filled due to classes other than the coverage stack. What should I do?

branches covered ratio is 0.9, but expected minimum is 1.0

@mfvanek
Copy link
Owner

mfvanek commented May 1, 2024

@BLoHny

Even though I filled the test coverage of the newly created class to 100% and corrected other test errors, the coverage is not filled due to classes other than the coverage stack. What should I do?

branches covered ratio is 0.9, but expected minimum is 1.0

JaCoCo provides an html report. You can analyze it and figure out parts not covered properly with tests.
I need to see your latest changes in order to give more feedback.

P.S. Also you can split your PR into two parts and push changes to model separately.
I mean

  • pg-index-health-model/src/main/java/io/github/mfvanek/pg/model/constraint/Constraint.java
  • pg-index-health-model/src/main/java/io/github/mfvanek/pg/model/constraint/ConstraintType.java

@BLoHny
Copy link
Collaborator Author

BLoHny commented May 1, 2024

https://github.com/mfvanek/pg-index-health/blob/master/pg-index-health-model/src/testFixtures/java/io/github/mfvanek/pg/support/TestUtils.java

image

This is where the coverage issue for the private constructor. I don't think test coverage for this class is needed. What are your thoughts?

@mfvanek
Copy link
Owner

mfvanek commented May 1, 2024

This is where the coverage issue for the private constructor. I don't think test coverage for this class is needed. What are your thoughts?

It's definitely not an issue. We don't collect code coverage from test classes. Push your changes and I'll take a look

@mfvanek
Copy link
Owner

mfvanek commented May 2, 2024

Hi @BLoHny,
I cherry-picked your commits and made some improvements.
Your code is already in the master branch.

@mfvanek mfvanek closed this May 2, 2024
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