diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java b/org.springframework.test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java index 01056e69a6d..aa4cdd2aa66 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java @@ -83,8 +83,8 @@ public class DirtiesContextTestExecutionListener extends AbstractTestExecutionLi ClassMode classMode = classDirtiesContext ? classDirtiesContextAnnotation.classMode() : null; if (logger.isDebugEnabled()) { - logger.debug("After test method: context [" + testContext + "], class-level dirtiesContext [" - + classDirtiesContext + "], class mode [" + classMode + "], method-level dirtiesContext [" + logger.debug("After test method: context [" + testContext + "], class dirties context [" + + classDirtiesContext + "], class mode [" + classMode + "], method dirties context [" + methodDirtiesContext + "]."); } diff --git a/org.springframework.test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java b/org.springframework.test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java index 58edfc3ee56..48b3f436600 100644 --- a/org.springframework.test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java +++ b/org.springframework.test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java @@ -95,6 +95,8 @@ public class ClassLevelDirtiesContextTests { ContextCache contextCache = TestContextManager.contextCache; contextCache.clear(); contextCache.clearStatistics(); + cacheHits.set(0); + cacheMisses.set(0); assertCacheStats("BeforeClass", 0, cacheHits.get(), cacheMisses.get()); }