JaCoCo Memory Allocation after Job is terminated
I haven't found the concrete solution to this problem, but I have built the small workaround. Maybe it will be usefull for somebody.
The point is to create a job that will be running one script every hour. The script is checking if there are some jacoco processes running longer than 3600 seconds and kill them.
The script:
#!/bin/bashPROCESS_NAME=jacocoMAX_TIME=3600echo "Searching for $PROCESS_NAME processes running for more than $MAX_TIME seconds"pgrep -f $PROCESS_NAME | while read pid do running_time=$(ps -feo "etimes=" $pid | sed -e 's/ //g') if [ $running_time -gt $MAX_TIME ] then echo "killing the process with $pid" kill $pid fi done