/** * Called on the "main" test thread, after any configuration method. */ public static void testFinished(String testName) { cleanUpResources(testName); if (!testName.equals(threadTestName.get())) { cleanUpResources(getCurrentTestName()); throw new IllegalArgumentException("Current thread's test name was not set correctly: " + getCurrentTestName() + ", should have been " + testName); } setThreadTestName(null); }
@AfterMethod(alwaysRun = true) protected void clearContent() throws Throwable { if (cleanupAfterTest()) { log.debug("*** Test method complete; clearing contents on all caches."); TestingUtil.clearContent(cacheManagers); } else { TestingUtil.clearContent(cacheManagers); TestingUtil.killCacheManagers(cacheManagers); TestResourceTracker.cleanUpResources(getTestName()); cacheManagers.clear(); } }