Author: manik.surtani(a)jboss.com
Date: 2008-01-18 09:18:18 -0500 (Fri, 18 Jan 2008)
New Revision: 5163
Modified:
core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
Log:
Fixed failing tests
Modified: core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java 2008-01-18
00:07:59 UTC (rev 5162)
+++
core/trunk/src/test/java/org/jboss/cache/factories/LateConfigurationTest.java 2008-01-18
14:18:18 UTC (rev 5163)
@@ -5,6 +5,7 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.BuddyReplicationConfig;
import org.jboss.cache.config.CacheLoaderConfig;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.interceptors.OptimisticLockingInterceptor;
import org.jboss.cache.loader.DummyInMemoryCacheLoader;
import org.jboss.cache.marshall.AbstractMarshaller;
@@ -79,8 +80,24 @@
assert c.getCacheLoaderManager().getCacheLoader() instanceof
DummyInMemoryCacheLoader;
}
+ public void testBuddyManagerLocal()
+ {
+ // leaving cache mode as local
+ assert c.getBuddyManager() == null;
+
+ BuddyReplicationConfig brc = new BuddyReplicationConfig();
+ brc.setEnabled(true);
+ c.getConfiguration().setBuddyReplicationConfig(brc);
+
+ c.start();
+ assert c.getBuddyManager() != null;
+ assert !c.getBuddyManager().isEnabled();
+ }
+
public void testBuddyManager()
{
+ // we need to not be LOCAL if we want things to work with BR!
+ c.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
assert c.getBuddyManager() == null;
BuddyReplicationConfig brc = new BuddyReplicationConfig();
@@ -92,6 +109,7 @@
assert c.getBuddyManager().isEnabled();
}
+
public void testInterceptors()
{
assert TestingUtil.findInterceptor(c, OptimisticLockingInterceptor.class) == null;
Modified:
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-01-18
00:07:59 UTC (rev 5162)
+++
core/trunk/src/test/java/org/jboss/cache/notifications/RemoteCacheListenerTest.java 2008-01-18
14:18:18 UTC (rev 5163)
@@ -122,7 +122,7 @@
spi2 = (CacheSPI) cache2;
assert spi1.getRPCManager() != spi2.getRPCManager();
- assert TestingUtil.extractField(spi1.getRPCManager(), "c") !=
TestingUtil.extractField(spi2.getRPCManager(), "c");
+ assert TestingUtil.extractField(spi1.getRPCManager(), "channel") !=
TestingUtil.extractField(spi2.getRPCManager(), "channel");
}
// simple tests first
Show replies by date