Multiple JVMs execution data written to a single jacoco.exec file?

53 views
Skip to first unread message

rusha...@gmail.com

unread,
Apr 7, 2017, 3:09:37 PM4/7/17
to JaCoCo and EclEmma Users
Hi everyone,

I'm trying to get coverage of integration tests that, with hit multiple JVMs, so currently I'm starting all of the JVMs with a single jacoco-agent-runtime.jar, and setting the destFile option to point to a single jacoco.exec file.

Have anyone else tried this? If so, has anyone had any problems?
For example, what if 2 JVMs stop at the same time and try to dump the execution data to that single .exec file?

Any thoughts?

Thanks

bjk...@gmail.com

unread,
Apr 10, 2017, 12:29:48 PM4/10/17
to JaCoCo and EclEmma Users, rusha...@gmail.com
As of 0.6.2, JaCoCo uses file locking so that each JVM has exclusive access when writing to the *.exec file.

http://www.eclemma.org/jacoco/trunk/doc/changes.html
"Support for parallel test execution: Different agents can now safely write to the same *.exec file (GitHub #52 <https://github.com/jacoco/jacoco/pull/52>)."

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages