Author: manik.surtani(a)jboss.com
Date: 2009-02-17 10:40:34 -0500 (Tue, 17 Feb 2009)
New Revision: 7702
Modified:
core/branches/flat/src/test/java/org/horizon/loader/PassivationFunctionalTest.java
core/branches/flat/src/test/java/org/horizon/loader/decorators/SingletonStoreTest.java
core/branches/flat/src/test/java/org/horizon/notifications/CacheListenerCacheLoaderTest.java
core/branches/flat/src/test/java/org/horizon/test/AbstractCacheTest.java
core/branches/flat/src/test/java/org/horizon/test/MultipleCacheManagersTest.java
core/branches/flat/src/test/java/org/horizon/test/SingleCacheManagerTest.java
Log:
More test fwk fixes
Modified:
core/branches/flat/src/test/java/org/horizon/loader/PassivationFunctionalTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/loader/PassivationFunctionalTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++
core/branches/flat/src/test/java/org/horizon/loader/PassivationFunctionalTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -24,7 +24,7 @@
*
* @author Manik Surtani
*/
-@Test(groups = "functional", sequential = true)
+@Test(groups = "functional", sequential = true, testName =
"loader.PassivationFunctionalTest")
public class PassivationFunctionalTest {
Cache cache;
CacheStore store;
Modified:
core/branches/flat/src/test/java/org/horizon/loader/decorators/SingletonStoreTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/loader/decorators/SingletonStoreTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++
core/branches/flat/src/test/java/org/horizon/loader/decorators/SingletonStoreTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -29,7 +29,7 @@
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
-@Test(groups = "functional", sequential = true)
+@Test(groups = "functional", sequential = true, testName =
"loader.decorators.SingletonStoreTest")
public class SingletonStoreTest extends MultipleCacheManagersTest {
private static final Log log = LogFactory.getLog(SingletonStoreTest.class);
private static final AtomicInteger storeCounter = new AtomicInteger(0);
Modified:
core/branches/flat/src/test/java/org/horizon/notifications/CacheListenerCacheLoaderTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/notifications/CacheListenerCacheLoaderTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++
core/branches/flat/src/test/java/org/horizon/notifications/CacheListenerCacheLoaderTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -19,7 +19,7 @@
import java.util.LinkedList;
import java.util.List;
-@Test(groups = "functional", sequential = true)
+@Test(groups = "functional", sequential = true, testName =
"notifications.CacheListenerCacheLoaderTest")
public class CacheListenerCacheLoaderTest {
CacheManager cm;
Modified: core/branches/flat/src/test/java/org/horizon/test/AbstractCacheTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/test/AbstractCacheTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++ core/branches/flat/src/test/java/org/horizon/test/AbstractCacheTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -2,10 +2,12 @@
import org.horizon.AdvancedCache;
import org.horizon.Cache;
+import org.horizon.container.DataContainer;
import org.horizon.context.InvocationContext;
-import org.horizon.container.DataContainer;
import org.horizon.lifecycle.ComponentStatus;
import org.horizon.loader.CacheLoaderManager;
+import org.horizon.logging.Log;
+import org.horizon.logging.LogFactory;
import org.horizon.manager.CacheManager;
import org.horizon.manager.DefaultCacheManager;
@@ -20,10 +22,8 @@
* @author Mircea.Markus(a)jboss.com
*/
public class AbstractCacheTest {
- /**
- * Importnat: do not reset RegionManager (rm.reset()) here, as this woulfd cause
eviction region to be clered. If
- * that is needed, do it in @BeforeMethods
- */
+ protected static final Log fwkLogger =
LogFactory.getLog("TestFrameworkLogger");
+
public void clearContent(CacheManager cacheManager) {
Set<Cache> runningCaches = getRunningCaches(cacheManager);
for (Cache cache : runningCaches) {
@@ -61,11 +61,11 @@
}
private void removeInMemoryData(Cache cache) {
- System.out.println("Cleaning data for cache: " + cache.getName());
+ fwkLogger.debug("Cleaning data for cache: {0}", cache.getName());
DataContainer dataContainer = TestingUtil.extractComponent(cache,
DataContainer.class);
- System.out.println("AbstractCacheTest.removeInMemoryData-->
dataContainerBefore==" + dataContainer);
+ fwkLogger.debug("removeInMemoryData(): dataContainerBefore == {0}",
dataContainer);
dataContainer.clear();
- System.out.println("AbstractCacheTest.removeInMemoryData-->
dataContainerAfter==" + dataContainer);
+ fwkLogger.debug("removeInMemoryData(): dataContainerAfter == {0}",
dataContainer);
}
private void clearRunningTx(Cache cache) {
Modified:
core/branches/flat/src/test/java/org/horizon/test/MultipleCacheManagersTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/test/MultipleCacheManagersTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++
core/branches/flat/src/test/java/org/horizon/test/MultipleCacheManagersTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -28,7 +28,6 @@
public abstract class MultipleCacheManagersTest extends AbstractCacheTest {
private List<CacheManager> cacheManagers = new ArrayList<CacheManager>();
-
private IdentityHashMap<Cache, ReplListener> listeners = new
IdentityHashMap<Cache, ReplListener>();
@BeforeClass
@@ -43,7 +42,7 @@
@AfterMethod
protected void clearContent() throws Throwable {
- System.out.println("MultipleCacheManagersTest.clearContent");
+ fwkLogger.debug("MultipleCacheManagersTest.clearContent");
if (cacheManagers.isEmpty())
throw new IllegalStateException("No caches registered! Use
registerCacheManager(Cache... caches) do that!");
for (CacheManager cacheManager : cacheManagers) {
Modified: core/branches/flat/src/test/java/org/horizon/test/SingleCacheManagerTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/test/SingleCacheManagerTest.java 2009-02-17
15:29:55 UTC (rev 7701)
+++
core/branches/flat/src/test/java/org/horizon/test/SingleCacheManagerTest.java 2009-02-17
15:40:34 UTC (rev 7702)
@@ -7,8 +7,8 @@
import org.testng.annotations.BeforeClass;
/**
- * Base class for tests that operate on a single (most likely local) cache instance.
- * This operates similar to {@link org.horizon.test.MultipleCacheManagersTest}, but on
only once CacheManager.
+ * Base class for tests that operate on a single (most likely local) cache instance. This
operates similar to {@link
+ * org.horizon.test.MultipleCacheManagersTest}, but on only once CacheManager.
*
* @author Mircea.Markus(a)jboss.com
* @see org.horizon.test.MultipleCacheManagersTest
@@ -47,5 +47,4 @@
}
protected abstract CacheManager createCacheManager() throws Exception;
-
}
Show replies by date