It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Do tests run in parallel with the Clover-for-Maven instrument-test goal?

Stephen Williams May 02, 2017

I am diagnosing an issue with a continuous integration build of a Maven project. The Maven project uses the Clover-for-Maven plugin instrument-test goal in order to check code coverage and fail the build if the coverage is below a target value.

The Maven project runs both unit and integration tests during the Maven lifecycle "test" phase (I know it shouldn't but it does). The integration tests access a database. The integration tests are failing because of what looks like multiple tests reading and writing data to the database at the same time.

My investigation leads me to the following question. If my Maven project uses the instrument-test goal, will the Clover-for-Maven plugin create a new process for to do the code coverage check that might result in the integration tests being run twice and at the same time?

If it will do, I think that is likely to be the cause of the intermittent build failure.

1 answer

0 votes
Grzegorz Lewandowski Atlassian Team May 08, 2017

Clover integration itself doesn't invoke any tests so if they run in parallel it's up to your Maven configuration. HoweverClover instument mojo forks Maven lifecycle till install phase which I think might mean some of the phases (like test) may be executed twice. 

I'm not sure if you have any parallel builds in your process but generally speaking Clover doesn't support parallel builds on any step of execution (instrumentation, test execution, report generation) and using {{-T}} parallel Maven builds with Clover is not recommended. 

Stephen Williams May 15, 2017

Hi Grzegorz. Thanks for the information. It is useful.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Handling Opsgenie Alerts

Hi everyone, welcome to the kb articles for Opsgenie FAQs. I'm one of the Technical Support Engineers for Opsgenie who will be providing weekly posts on FAQs from customers.   All alerts are ...

22 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you