Improve extensibility of TestContext bootstrapping & context caching
- DefaultBootstrapContext and DefaultCacheAwareContextLoaderDelegate
are now public classes in the 'support' subpackage.
- Introduced getCacheAwareContextLoaderDelegate() in
AbstractTestContextBootstrapper as an extension point for configuring
custom ContextCache support.
- Introduced reflection-based createBootstrapContext() utility method
in BootstrapUtils; TestContextManager now delegates to BootstrapUtils
in order to avoid package cycles.
- Introduced logStatistics() method in the ContextCache API and defined
statistics logging category as a constant.
- DefaultCacheAwareContextLoaderDelegate now delegates to
ContextCache.logStatistics().
Issue: SPR-12683
@ -96,17 +100,17 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@@ -96,17 +100,17 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@ -282,7 +286,7 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@@ -282,7 +286,7 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@ -471,6 +475,20 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@@ -471,6 +475,20 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
@ -240,6 +244,20 @@ public class DefaultContextCache implements ContextCache {
@@ -240,6 +244,20 @@ public class DefaultContextCache implements ContextCache {
*{@inheritDoc}
*/
@Override
publicvoidlogStatistics(){
if(statsLogger.isDebugEnabled()){
statsLogger.debug("Spring test ApplicationContext cache statistics: "+this);