Move static ContextCache to DefaultCacheAwareContextLoaderDelegate
Issue: SPR-12683
This commit is contained in:
@@ -28,14 +28,14 @@ import static org.junit.Assert.*;
|
||||
public class ContextCacheTestUtils {
|
||||
|
||||
/**
|
||||
* Reset the state of the context cache.
|
||||
* Reset the state of the static context cache in {@link DefaultCacheAwareContextLoaderDelegate}.
|
||||
*/
|
||||
public static final void resetContextCache() {
|
||||
TestContextManager.contextCache.reset();
|
||||
DefaultCacheAwareContextLoaderDelegate.defaultContextCache.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert the statistics of the context cache in {@link TestContextManager}.
|
||||
* Assert the statistics of the static context cache in {@link DefaultCacheAwareContextLoaderDelegate}.
|
||||
*
|
||||
* @param usageScenario the scenario in which the statistics are used
|
||||
* @param expectedSize the expected number of contexts in the cache
|
||||
@@ -44,8 +44,8 @@ public class ContextCacheTestUtils {
|
||||
*/
|
||||
public static final void assertContextCacheStatistics(String usageScenario, int expectedSize, int expectedHitCount,
|
||||
int expectedMissCount) {
|
||||
assertContextCacheStatistics(TestContextManager.contextCache, usageScenario, expectedSize, expectedHitCount,
|
||||
expectedMissCount);
|
||||
assertContextCacheStatistics(DefaultCacheAwareContextLoaderDelegate.defaultContextCache, usageScenario,
|
||||
expectedSize, expectedHitCount, expectedMissCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user