Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Deleted user May 2, 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
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 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. 

Deleted user May 15, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events