[jboss-cvs] JBossAS SVN: r111973 - branches/JBPAPP_5_0_0_GA_JBPAPP-6969/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 9 17:26:27 EDT 2011
Author: klape
Date: 2011-08-09 17:26:26 -0400 (Tue, 09 Aug 2011)
New Revision: 111973
Modified:
branches/JBPAPP_5_0_0_GA_JBPAPP-6969/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
Log:
[JBPAPP-6969] Adding test case
Modified: branches/JBPAPP_5_0_0_GA_JBPAPP-6969/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
===================================================================
--- branches/JBPAPP_5_0_0_GA_JBPAPP-6969/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2011-08-09 21:22:26 UTC (rev 111972)
+++ branches/JBPAPP_5_0_0_GA_JBPAPP-6969/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2011-08-09 21:26:26 UTC (rev 111973)
@@ -1279,6 +1279,28 @@
MBeanServerFactory.releaseMBeanServer(mbeanServer);
}
}
+
+ private class TestReplicantManager extends DistributedReplicantManagerImpl
+ {
+ public TestReplicantManager(MockHAPartition partition)
+ {
+ super(partition);
+ }
+
+ public boolean testAddReplicant(String key, String nodeName, java.io.Serializable replicant)
+ {
+ return addReplicant(key, nodeName, replicant);
+ }
+ }
+
+ public void testAddReplicant() throws Exception
+ {
+ ClusterNode node = new ClusterNodeImpl(new IpAddress("127.0.0.1", 12340));
+ MockHAPartition partition = new MockHAPartition(node);
+ TestReplicantManager drm = new TestReplicantManager(partition);
+ assertTrue (drm.testAddReplicant("test","test","test"));
+ assertFalse(drm.testAddReplicant("test","test","test"));
+ }
private void confirmReplicantList(List current, Object[] all, boolean[] added)
{
More information about the jboss-cvs-commits
mailing list