[infinispan-commits] Infinispan SVN: r1656 - trunk/core/src/test/java/org/infinispan/test.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Tue Apr 6 04:07:44 EDT 2010
Author: mircea.markus
Date: 2010-04-06 04:07:44 -0400 (Tue, 06 Apr 2010)
New Revision: 1656
Modified:
trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
Log:
better logging
Modified: trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2010-04-01 22:24:05 UTC (rev 1655)
+++ trunk/core/src/test/java/org/infinispan/test/SingleCacheManagerTest.java 2010-04-06 08:07:44 UTC (rev 1656)
@@ -4,6 +4,8 @@
import org.infinispan.config.Configuration;
import org.infinispan.manager.CacheManager;
import org.infinispan.test.fwk.TestCacheManagerFactory;
+import org.infinispan.util.logging.Log;
+import org.infinispan.util.logging.LogFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
@@ -19,22 +21,39 @@
*/
@Test
public abstract class SingleCacheManagerTest extends AbstractCacheTest {
+
+ private static Log log = LogFactory.getLog(SingleCacheManagerTest.class);
+
protected CacheManager cacheManager;
protected Cache<Object, Object> cache;
@BeforeClass()
protected void createBeforeClass() throws Exception {
- if (cleanup == CleanupPhase.AFTER_TEST) cacheManager = createCacheManager();
+ try {
+ if (cleanup == CleanupPhase.AFTER_TEST) cacheManager = createCacheManager();
+ } catch (Exception e) {
+ log.error("Unexpected!", e);
+ throw e;
+ }
}
@BeforeMethod
protected void createBeforeMethod() throws Exception {
- if (cleanup == CleanupPhase.AFTER_METHOD) cacheManager = createCacheManager();
+ try {
+ if (cleanup == CleanupPhase.AFTER_METHOD) cacheManager = createCacheManager();
+ } catch (Exception e) {
+ log.error("Unexpected!", e);
+ throw e;
+ }
}
@AfterClass(alwaysRun=true)
protected void destroyAfterClass() {
- if (cleanup == CleanupPhase.AFTER_TEST) TestingUtil.killCacheManagers(cacheManager);
+ try {
+ if (cleanup == CleanupPhase.AFTER_TEST) TestingUtil.killCacheManagers(cacheManager);
+ } catch (Exception e) {
+ log.error("Unexpected!", e);
+ }
}
@AfterMethod(alwaysRun=true)
More information about the infinispan-commits
mailing list