1

I have Maven project on Jenkins that runs tests. It usually takes 18 minutes to run more than 1000 tests, but now my build with 500 tests already lasts 1 hour and it hasn't finished yet.

Anyone has suggestion?

Thanks.

Miodrag
  • 51
  • 1
  • 4
  • Do you need to run thoose tests? – tec Mar 20 '18 at 09:19
  • Yes, it is essential for my company. – Miodrag Mar 20 '18 at 09:44
  • Please, provide more details. For example, Jenkins maven step (maven command line), pom.xml to see what plugins you use. And for you, please check history of changes of pom file and jenkins configuration: maybe someone from your team changed something... – Yan Khonski Sep 28 '20 at 21:08

1 Answers1

0

It is hard to guess what is causing the delay based on the question. In general, you can improve the build time by launching it in parallel.

You can launch maven with the -T 1C flag. This will attempt to start a parallel build of at most 1 thread per core. Maven can determine based on the dependency tree structure which builds can be started parallel.

Check Maven: how to do parallel builds? for more info.

yamenk
  • 46,736
  • 10
  • 93
  • 87