Skip to content

Conversation

AniketDev7
Copy link
Contributor

@AniketDev7 AniketDev7 commented Aug 20, 2025

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 20, 2025 14:11
@AniketDev7 AniketDev7 requested a review from reeshika-h August 20, 2025 14:11
@AniketDev7 AniketDev7 changed the title Fix: failing taxonomy test cases Fix: failing taxonomy test cases DX-3461 Aug 20, 2025
@AniketDev7 AniketDev7 merged commit 7854657 into staging Aug 21, 2025
9 checks passed
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