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 21, 2025 06:01
@AniketDev7 AniketDev7 requested a review from reeshika-h August 21, 2025 07:29
@AniketDev7 AniketDev7 mentioned this pull request Aug 21, 2025
@harshithad0703 harshithad0703 marked this pull request as draft August 22, 2025 05:48
@harshithad0703 harshithad0703 changed the title Fix: failing taxonomy test cases DX-3461 DX | 25-08-2025 | Fix: failing taxonomy test cases DX-3461 Aug 22, 2025
@harshithad0703 harshithad0703 marked this pull request as ready for review August 25, 2025 12:18
@harshithad0703 harshithad0703 merged commit 8a3fcfc into master Aug 25, 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.

5 participants