Skip to content

Code coverage reporting / coveralls broken since moving to Java 8 #87

@mattnworb

Description

@mattnworb

Looking at https://coveralls.io/github/spotify/folsom , the coverage graph shows all 0s since #84 was merged:

image

This is because cobertura fails to instrument classes at runtime with exceptions like this in the Travis build:

[cobertura] WARN  [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /home/travis/build/spotify/folsom/target/generated-classes/cobertura/com/spotify/folsom/BackoffFunction.class
java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)

which leads to the coveralls plugin seeing 0 lines of code in 0 files:

[INFO] Starting Coveralls job for travis-ci (322863796)
[INFO] Git commit f660fb8 in master
[INFO] Writing Coveralls data to /home/travis/build/spotify/folsom/target/coveralls.json...
[INFO] Processing coverage report from /home/travis/build/spotify/folsom/target/site/cobertura/coverage.xml
[INFO] Successfully wrote Coveralls data in 62ms
[INFO] Gathered code coverage metrics for 0 source files with 0 lines of code:
[INFO] - 0 relevant lines
[INFO] - 0 covered lines
[INFO] - 0 missed lines
[INFO] Submitting Coveralls data to API
[INFO] Successfully submitted Coveralls data in 861ms for Job #424.1
[INFO] https://coveralls.io/jobs/32392210

The root cause seems to be that cobertura does not support Java 8:

The underlying problem in cobertura has been fixed but there has not been a release in almost 3 years. The cobertura project seems to be dead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions