Skip to content

Conversation

AniketDev7
Copy link
Contributor

JaCoCo Java 18 Compatibility

  • Issue: JaCoCo plugin version 0.8.7 was incompatible with Java 18, causing java.lang.instrument.IllegalClassFormatException in GoCD pipeline
  • Fix: Updated JaCoCo plugin version from 0.8.7 to 0.8.13 in pom.xml
  • Root Cause: Older JaCoCo versions don't support Java 18's enhanced class format
  • Impact: Tests now run successfully in GoCD pipeline with OpenJDK 18

Test Case Failures

  • Issue: Two test cases were failing due to case sensitivity mismatch in JSON file paths
  • Fix: Updated file paths in TaxonomyAPITest.java from mockTaxonomy/ to mocktaxonomy/
  • Files Changed:
    • src/test/java/com/contentstack/cms/stack/TaxonomyAPITest.java
    • src/test/resources/mocktaxonomy/createTerm.json
    • src/test/resources/mocktaxonomy/updateTerm.json
  • Root Cause: Test code was referencing mockTaxonomy/ but actual directory was mocktaxonomy/

🔧 Technical Details

JaCoCo Version Update

<jococo-plugin.version>0.8.13</jococo-plugin.version>

Test Path Corrections

// Before: "mockTaxonomy/createTerm.json"
// After: "mocktaxonomy/createTerm.json"

✅ Testing

  • All tests now pass locally and in GoCD pipeline
  • Test count: 157/157 passed (0 failed, 0 errors)
  • Build time: ~23 seconds
  • No regression in existing functionality

📋 Checklist

  • Tests pass locally
  • Tests pass in GoCD pipeline
  • No breaking changes introduced
  • JaCoCo compatibility verified with Java 18

@AniketDev7 AniketDev7 requested a review from a team as a code owner August 19, 2025 21:36
@AniketDev7 AniketDev7 requested review from reeshika-h and removed request for a team August 19, 2025 21:36
Copy link
Contributor

@reeshika-h reeshika-h left a comment

Choose a reason for hiding this comment

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

lgtm

@AniketDev7 AniketDev7 merged commit cb7a26f into development Aug 20, 2025
9 checks passed
@AniketDev7 AniketDev7 deleted the fix/jacoco-java18-compatibility branch August 20, 2025 09:21
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