Bug 409068 - No coverage has been collected during coverage launch (code 5101)
Summary: No coverage has been collected during coverage launch (code 5101)
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-25 13:35 EDT by Lorenzo Bettini CLA
Modified: 2019-02-25 14:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Bettini CLA 2013-05-25 13:35:57 EDT
When running the headless "emma" command in a Jenkins job, I often get this error

     [java] INFO:  Starting test session MyTest
     [java] INFO:  Running test...
...
     [java] INFO:    ...OK [0.201s]
     [java] INFO:  Tests finished.
     [java] INFO:  Elapsed time: 1.556 seconds.
     [java] INFO:  Total number of tests executed: 2
     [java] INFO:  Successful tests: 2
     [java] INFO:  Failed tests: 0
     [java] INFO:  Errors: 0
     [java] INFO:  Ignored tests: 0
     [java] INFO:  Overall status: OK
     [java] ERROR: No coverage has been collected during coverage launch
(code 5101).

the strange thing is that most of the time the
coverage.exec is actually created (in spite of the ERROR
above)... and indeed, the build does NOT issue a failure.

by looking at buckminster code, Emma.java, I see that in case there is
no coverage session, buckminster throws an exception with message "No
coverage sessions found", while the above error is issued by eclemma
itself, and the faq (http://www.eclemma.org/faq.html#trouble01) says

"This happens when the Java process did not terminate properly, e.g. has
been manually killed with the Terminate button. Make sure your program
terminates on its own. "

indeed, the buckminster's emma command terminates, in fact, by using
DEBUG I see

INFO:  Tests finished.
INFO:  Elapsed time: 69.02 seconds.
INFO:  Total number of tests executed: 113
INFO:  Successful tests: 113
INFO:  Failed tests: 0
INFO:  Errors: 0
INFO:  Ignored tests: 0
INFO:  Overall status: OK
ERROR: No coverage has been collected during coverage launch (code 5101).
Doing full workspace refresh
Waiting for jobs to end

thus, I assume the buckminster command terminates correctly, but
internally EclEmma issues that error because its Java process is
terminated before it has finished?

If I run plain junit test suite and the plug-in junit test suite, the
first suite reports this error

If I run plug-in junit test suite first and then plain junit test suite,
none of them reports this error

when the error is reported, the coverage.exec file is generated anyway
(most of time, when it's not generated, buckminster itself fails, but I rarely experienced this, say 1 out of 50 builds).

Can it be due to some synchronization issues when buckminster runs
eclemma and does not wait for it to terminate?

The above problem happens in a Jenkins server, which is almost 10 years
old, thus not very powerful...