[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/multiplexer ...
Manik Surtani
msurtani at jboss.com
Thu Jan 11 07:24:16 EST 2007
User: msurtani
Date: 07/01/11 07:24:16
Modified: tests/functional/org/jboss/cache/multiplexer
BadMuxConfigTest.java
Log:
Removed unused constructors
Revision Changes Path
1.3 +44 -37 JBossCache/tests/functional/org/jboss/cache/multiplexer/BadMuxConfigTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BadMuxConfigTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/multiplexer/BadMuxConfigTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- BadMuxConfigTest.java 3 Jan 2007 04:03:47 -0000 1.2
+++ BadMuxConfigTest.java 11 Jan 2007 12:24:16 -0000 1.3
@@ -1,22 +1,21 @@
package org.jboss.cache.multiplexer;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-
+import junit.framework.TestCase;
import org.jboss.cache.Cache;
-import org.jboss.cache.CacheImpl;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.factories.DefaultCacheFactory;
import org.jgroups.JChannel;
-import junit.framework.TestCase;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
/**
* Tests that JBC starts correctly even if the multiplexer
* configuration is incorrect.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class BadMuxConfigTest extends TestCase
{
@@ -30,7 +29,7 @@
Configuration config = new Configuration();
config.setCacheMode(Configuration.CacheMode.REPL_SYNC);
config.setClusterConfig(JChannel.DEFAULT_PROTOCOL_STACK);
- cache = new CacheImpl(config);
+ cache = DefaultCacheFactory.getInstance().createCache(config, false);
cacheStarted = false;
super.setUp();
@@ -141,18 +140,26 @@
cache.start();
cacheStarted = true;
if (expectFail)
+ {
fail("Start did not fail as expected");
+ }
if (expectMux)
+ {
assertTrue("Cache is using mux", cache.getConfiguration().isUsingMultiplexer());
+ }
else
+ {
assertFalse("Cache is not using mux ", cache.getConfiguration().isUsingMultiplexer());
}
+ }
catch (Exception e)
{
if (!expectFail)
+ {
fail("Caught exception starting cache " + e.getLocalizedMessage());
}
+ }
}
}
More information about the jboss-cvs-commits
mailing list