Author: pferraro
Date: 2009-01-27 10:01:47 -0500 (Tue, 27 Jan 2009)
New Revision: 2223
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/mcmp/ResetRequestSourceTestCase.java
Log:
Ensure excluded contexts are not registered during node reset.
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java 2009-01-27
14:57:59 UTC (rev 2222)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java 2009-01-27
15:01:47 UTC (rev 2223)
@@ -40,6 +40,7 @@
import org.jboss.ha.framework.interfaces.HAServiceKeyProvider;
import org.jboss.ha.framework.interfaces.HASingletonMBean;
import org.jboss.modcluster.config.BalancerConfiguration;
+import org.jboss.modcluster.config.MCMPHandlerConfiguration;
import org.jboss.modcluster.config.NodeConfiguration;
import org.jboss.modcluster.ha.rpc.ResetRequestGroupRpcResponse;
import org.jboss.modcluster.mcmp.MCMPRequest;
@@ -57,6 +58,7 @@
{
private NodeConfiguration nodeConfig =
EasyMock.createStrictMock(NodeConfiguration.class);
private BalancerConfiguration balancerConfig =
EasyMock.createStrictMock(BalancerConfiguration.class);
+ private MCMPHandlerConfiguration mcmpConfig =
EasyMock.createStrictMock(MCMPHandlerConfiguration.class);
private HAServiceKeyProvider key =
EasyMock.createStrictMock(HAServiceKeyProvider.class);
private HASingletonMBean singleton =
EasyMock.createStrictMock(HASingletonMBean.class);
private HAPartition partition = EasyMock.createStrictMock(HAPartition.class);
@@ -65,7 +67,7 @@
@Test
public void getResetRequestsNonMaster()
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
EasyMock.expect(this.singleton.isMasterNode()).andReturn(false);
@@ -85,7 +87,7 @@
@Test
public void getResetRequestsNoServer() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
@@ -116,7 +118,7 @@
@Test
public void getResetRequests() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
MCMPRequest request1 = EasyMock.createMock(MCMPRequest.class);
@@ -176,7 +178,7 @@
@Test
public void getLocalResetRequestsNoServer() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
@@ -194,7 +196,7 @@
@Test
public void getLocalResetRequests() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/mcmp/ResetRequestSourceTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/mcmp/ResetRequestSourceTestCase.java 2009-01-27
14:57:59 UTC (rev 2222)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/mcmp/ResetRequestSourceTestCase.java 2009-01-27
15:01:47 UTC (rev 2223)
@@ -34,6 +34,7 @@
import org.easymock.EasyMock;
import org.jboss.modcluster.ModClusterServiceTestCase;
import org.jboss.modcluster.config.BalancerConfiguration;
+import org.jboss.modcluster.config.MCMPHandlerConfiguration;
import org.jboss.modcluster.config.NodeConfiguration;
import org.jboss.modcluster.mcmp.impl.ResetRequestSourceImpl;
import org.junit.Assert;
@@ -49,9 +50,10 @@
private final NodeConfiguration nodeConfig =
EasyMock.createStrictMock(NodeConfiguration.class);
private final BalancerConfiguration balancerConfig =
EasyMock.createStrictMock(BalancerConfiguration.class);
+ private final MCMPHandlerConfiguration mcmpConfig =
EasyMock.createStrictMock(MCMPHandlerConfiguration.class);
private final MCMPRequestFactory requestFactory =
EasyMock.createStrictMock(MCMPRequestFactory.class);
- private final ResetRequestSource source = new ResetRequestSourceImpl(this.nodeConfig,
this.balancerConfig, this.requestFactory);
+ private final ResetRequestSource source = new ResetRequestSourceImpl(this.nodeConfig,
this.balancerConfig, this.mcmpConfig, this.requestFactory);
@Test
public void testGetResetRequests() throws Exception