[jboss-cvs] JBossAS SVN: r65414 - trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Sep 14 17:47:39 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-09-14 17:47:39 -0400 (Fri, 14 Sep 2007)
New Revision: 65414
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
Log:
[JBAS-4724] DRM lifecycle must be controlled by ClusterPartition
Don't inject DS via the config object
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2007-09-14 21:46:17 UTC (rev 65413)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java 2007-09-14 21:47:39 UTC (rev 65414)
@@ -646,26 +646,25 @@
DistributedStateImpl ds1 = new DistributedStateImpl();
ds1.setClusteredCache(wrapper1.getCache());
- DistributedReplicantManager drm1 = new DistributedReplicantManagerImpl();
+ DistributedReplicantManagerImpl drm1 = new DistributedReplicantManagerImpl();
ClusterPartitionConfig config1 = new ClusterPartitionConfig();
config1.setPartitionName(partitionName);
config1.setNodeUniqueId("DRMTestCaseNode1");
config1.setClusteredCache(wrapper1.getCache());
- config1.setDistributedState(ds1);
config1.setStateTransferTimeout(30000);
config1.setMethodCallTimeout(60000);
ClusterPartition partition1 = new ClusterPartition(config1);
- partition1.setDistributedReplicantManager(drm1);
+ partition1.setDistributedReplicantManagerImpl(drm1);
+ partition1.setDistributedStateImpl(ds1);
partition1.setBindIntoJndi(false);
// handle circular dependency between HAPartition and DRM
partition1.create();
((DistributedReplicantManagerImpl)drm1).setHAPartition(partition1);
- ((DistributedReplicantManagerImpl)drm1).create();
+ ((DistributedReplicantManagerImpl)drm1).createService();
partition1.start();
- ((DistributedReplicantManagerImpl)drm1).start();
Thread.sleep(10000);
@@ -685,26 +684,25 @@
DistributedStateImpl ds2 = new DistributedStateImpl();
ds2.setClusteredCache(wrapper2.getCache());
- DistributedReplicantManager drm2 = new DistributedReplicantManagerImpl();
+ DistributedReplicantManagerImpl drm2 = new DistributedReplicantManagerImpl();
ClusterPartitionConfig config2 = new ClusterPartitionConfig();
config2.setPartitionName(partitionName);
config2.setNodeUniqueId("DRMTestCaseNode2");
config2.setClusteredCache(wrapper2.getCache());
- config2.setDistributedState(ds2);
config2.setStateTransferTimeout(30000);
config2.setMethodCallTimeout(60000);
ClusterPartition partition2 = new ClusterPartition(config2);
- partition2.setDistributedReplicantManager(drm2);
+ partition2.setDistributedReplicantManagerImpl(drm2);
+ partition2.setDistributedStateImpl(ds2);
partition2.setBindIntoJndi(false);
// handle circular dependency between HAPartition and DRM
partition2.create();
((DistributedReplicantManagerImpl)drm2).setHAPartition(partition2);
- ((DistributedReplicantManagerImpl)drm2).create();
+ ((DistributedReplicantManagerImpl)drm2).createService();
partition2.start();
- ((DistributedReplicantManagerImpl)drm2).start();
Thread.sleep(10000);
// confirm that each partition contains two nodes
@@ -839,7 +837,7 @@
DistributedReplicantManagerImpl drm = new DistributedReplicantManagerImpl();
drm.setHAPartition(partition);
- drm.create();
+ drm.createService();
// Create a fake view for the MockHAPartition
@@ -851,7 +849,7 @@
allNodes.add(localAddress);
partition.setCurrentViewClusterNodes(allNodes);
- drm.start();
+ drm.startService();
BlockingListenerThread blt =
new BlockingListenerThread(drm, true, null);
@@ -944,7 +942,7 @@
DistributedReplicantManagerImpl drm = new DistributedReplicantManagerImpl();
drm.setHAPartition(partition);
- drm.create();
+ drm.createService();
// Create a fake view for the MockHAPartition
@@ -956,7 +954,7 @@
allNodes.add(localAddress);
partition.setCurrentViewClusterNodes(allNodes);
- drm.start();
+ drm.startService();
String sender = ((ClusterNode)remoteAddresses.get(0)).getName();
BlockingListenerThread blt =
@@ -1063,7 +1061,7 @@
DistributedReplicantManagerImpl drm = new DistributedReplicantManagerImpl();
drm.setHAPartition(partition);
- drm.create();
+ drm.createService();
// Create a fake view for the MockHAPartition
@@ -1075,7 +1073,7 @@
allNodes.add(localAddress);
partition.setCurrentViewClusterNodes(allNodes);
- drm.start();
+ drm.startService();
MockDeployer deployer = new MockDeployer(drm);
@@ -1245,8 +1243,8 @@
DistributedReplicantManagerImpl drm = new DistributedReplicantManagerImpl();
drm.setHAPartition(partition);
- drm.create();
- drm.start();
+ drm.createService();
+ drm.startService();
CachingListener listener = new CachingListener();
drm.registerListener("TEST", listener);
More information about the jboss-cvs-commits
mailing list