Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pitest WARNING : Slave exited abnormally due to TIMED_OUT

How should i get rid of this warning and add the timeout constant for pitest?

My command is:

mvn jacoco:report org.pitest:pitest-maven:mutationCoverage sonar:sonar -Dpitest.timeoutConst=8000

But it throws: WARNING : Slave exited abnormally due to TIMED_OUT

like image 950
Sunil Gulabani Avatar asked Apr 15 '16 08:04

Sunil Gulabani


1 Answers

It is unlikely that you will be able to get rid of all the warnings - they are generated when a mutation creates an infinite loop.

Pitest detects these by comparing the execution time of each test with the time it took when no mutation is present. If the test takes significantly more time to run then the process is killed and the mutation marked as timed out.

The reason pitest reports a warning is in case it is being too hasty in marking a mutation as an infnite loop - it might be that things are running a bit slowly for other reasons.

If you have a lot of timeouts the first thing to do is examine the report and see if they all look like legitimate infinite loops. If they do then there is nothing more to be done.

Iff some of the timeouts do not look like infinite loops then you can try increasing the timeout constant.

This can be set in the pom, or passed on the commandline. It should not be prefixed with pitest.

mvn org.pitest:pitest-maven:mutationCoverage -DtimeoutConstant=8000

like image 74
henry Avatar answered Sep 19 '22 15:09

henry