Description
I find myself needing to customize the ContextCache
so that I can run tests in parallel JUnit. Yes can be done with @BootstrapWith
, but it is quite burdensome to have to add this so every single test class. This is fine for a handful of classes, but not feasible with over 100 test classes.
I have worked out how to create separate Postgres databases for each application context that loads with an ApplicationContextInitializer
, which can be done globally with spring.factories
, but as far as I can tell, the TestContextBootstrapper
can only be overridden at the class level.
I cannot use @DirtiesContext
because again, I would have to annotate every class, and this is causing my Hikari pool to get closed.
In summary, it would be much appropriated to be able to customize ContextCache
globally for all tests.