Introduce reset() method in ContextCache

This commit is contained in:
Sam Brannen
2015-04-17 22:51:04 +02:00
parent c29eae3307
commit 2a4f4cd258
4 changed files with 44 additions and 27 deletions

View File

@@ -80,8 +80,7 @@ public class ClassLevelDirtiesContextTestNGTests {
@BeforeClass
public static void verifyInitialCacheState() {
ContextCache contextCache = TestContextManager.contextCache;
contextCache.clear();
contextCache.clearStatistics();
contextCache.reset();
cacheHits.set(0);
cacheMisses.set(0);
assertContextCacheStatistics("BeforeClass", 0, cacheHits.get(), cacheMisses.get());

View File

@@ -75,8 +75,7 @@ public class ClassLevelDirtiesContextTests {
@BeforeClass
public static void verifyInitialCacheState() {
ContextCache contextCache = TestContextManager.contextCache;
contextCache.clear();
contextCache.clearStatistics();
contextCache.reset();
cacheHits.set(0);
cacheMisses.set(0);
assertContextCacheStatistics("BeforeClass", 0, cacheHits.get(), cacheMisses.get());

View File

@@ -59,8 +59,7 @@ public class SpringRunnerContextCacheTests {
public static void verifyInitialCacheState() {
dirtiedApplicationContext = null;
ContextCache contextCache = TestContextManager.contextCache;
contextCache.clear();
contextCache.clearStatistics();
contextCache.reset();
assertContextCacheStatistics("BeforeClass", 0, 0, 0);
}