This change primarily converts the IndexCheck class from static/utility class to plain class. This allowed to use Mockito for testing normally. While there, I folded the parallelized project checking done previously in WebappListener to the class. This resulted in reworking the way how errors are propagated. For index check errors, the result is single exception carrying the list of source root paths corresponding to the indexes that failed the test. For I/O exceptions, just one is propagated.
There are 2 main use cases for the index check:
done per project in the Docker image
done for all indexes (projects enabled or not) during webapp startup
The thread handling in IndexCheck uses common per-class-instance pool for the project parallel processing. There is another pool used when index check is done for definitions. The latter pool comes from IndexParallelizer so even though multiple projects are checked in parallel, the CPU utilization will be bounded by that.
This change primarily converts the
IndexCheck
class from static/utility class to plain class. This allowed to use Mockito for testing normally. While there, I folded the parallelized project checking done previously inWebappListener
to the class. This resulted in reworking the way how errors are propagated. For index check errors, the result is single exception carrying the list of source root paths corresponding to the indexes that failed the test. For I/O exceptions, just one is propagated.There are 2 main use cases for the index check:
The thread handling in
IndexCheck
uses common per-class-instance pool for the project parallel processing. There is another pool used when index check is done for definitions. The latter pool comes fromIndexParallelizer
so even though multiple projects are checked in parallel, the CPU utilization will be bounded by that.