Skip to content

Conversation

@misrasaurabh1
Copy link
Contributor

Summary

  • Update coverage_critic to skip coverage check when CoverageStatus.NOT_FOUND is returned (e.g., when JaCoCo report doesn't exist in multi-module projects where the test module has no source classes)
  • Add JaCoCo configuration to include all class files for multi-module support

Problem

In multi-module Maven projects (like aerospike-client-java), the test module often has no source classes of its own - it only contains tests for classes in other modules. When JaCoCo runs in this context, it can't generate a coverage report because there are no classes to instrument in the test module's target/classes directory.

Previously, coverage_critic would fail with "threshold for test confidence was not met" even when all tests passed (e.g., 32 passed, 0 failed), because:

  1. JacocoCoverageUtils.load_from_jacoco_xml returned a CoverageData with status=NOT_FOUND and coverage=0.0
  2. coverage_critic checked if original_code_coverage: which was True (it's a CoverageData object, not None)
  3. Then it checked coverage >= COVERAGE_THRESHOLD which was 0.0 >= 30.0 = False

Solution

Check for CoverageStatus.NOT_FOUND status and skip the coverage check in that case, similar to how we handle None coverage data.

Test plan

  • Ran e2e test on aerospike-client-java (multi-module Maven project)
  • Verified 32 tests passed, 0 failed
  • Verified 20% runtime improvement was detected and PR was created successfully

🤖 Generated with Claude Code

- Update coverage_critic to skip coverage check when CoverageStatus.NOT_FOUND
  is returned (e.g., when JaCoCo report doesn't exist in multi-module projects
  where the test module has no source classes)
- Add JaCoCo configuration to include all class files for multi-module support

This fixes "threshold for test confidence was not met" errors that occurred
even when all tests passed, because JaCoCo couldn't generate coverage reports
for test modules without source classes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@misrasaurabh1 misrasaurabh1 changed the base branch from main to omni-java February 1, 2026 20:28
@misrasaurabh1 misrasaurabh1 merged commit c299d99 into omni-java Feb 1, 2026
16 of 26 checks passed
@misrasaurabh1 misrasaurabh1 deleted the fix-java-coverage-critic branch February 1, 2026 20:29
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