Author: pferraro
Date: 2009-01-27 13:15:24 -0500 (Tue, 27 Jan 2009)
New Revision: 2225
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/AbstractModClusterService.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandler.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandlerAdapter.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HAModClusterService.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSource.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceImpl.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/ResetRequestSource.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/ResetRequestSourceImpl.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java
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:
Added init(...) to ResetRequestSource - eliminating need for
HASingletonAwareResetRequestSource.setServer(...)
ResetRequestSource inits with server and context exclusion map - so this is only parsed
once.
Unit tests all pass now.
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/AbstractModClusterService.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/AbstractModClusterService.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/AbstractModClusterService.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -32,6 +32,7 @@
import org.jboss.modcluster.mcmp.MCMPHandler;
import org.jboss.modcluster.mcmp.MCMPRequest;
import org.jboss.modcluster.mcmp.MCMPRequestFactory;
+import org.jboss.modcluster.mcmp.ResetRequestSource;
import org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler;
import org.jboss.modcluster.mcmp.impl.DefaultMCMPRequestFactory;
import org.jboss.modcluster.mcmp.impl.ResetRequestSourceImpl;
@@ -50,10 +51,13 @@
public AbstractModClusterService()
{
this.requestFactory = new DefaultMCMPRequestFactory();
- this.mcmpHandler = new DefaultMCMPHandler(this, new ResetRequestSourceImpl(this,
this, this, this.requestFactory), this.requestFactory);
- JBossWebEventHandler eventHandler = new DefaultJBossWebEventHandler(this, this,
this, this.mcmpHandler, this.requestFactory, this, new AdvertiseListenerFactoryImpl());
+ ResetRequestSource source = new ResetRequestSourceImpl(this, this,
this.requestFactory);
+ this.mcmpHandler = new DefaultMCMPHandler(this, source, this.requestFactory);
+
+ JBossWebEventHandler eventHandler = new DefaultJBossWebEventHandler(this, this,
this, this.mcmpHandler, source, this.requestFactory, this, new
AdvertiseListenerFactoryImpl());
+
this.lifecycleListener = new JBossWebEventHandlerAdapter(eventHandler);
}
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -45,6 +45,7 @@
import org.jboss.modcluster.mcmp.MCMPHandler;
import org.jboss.modcluster.mcmp.MCMPRequest;
import org.jboss.modcluster.mcmp.MCMPRequestFactory;
+import org.jboss.modcluster.mcmp.ResetRequestSource;
/**
* Default implementation of {@link JBossWebEventHandler}.
@@ -65,24 +66,27 @@
private final BalancerConfiguration balancerConfig;
private final MCMPHandlerConfiguration mcmpConfig;
private final MCMPHandler mcmpHandler;
+ private final ResetRequestSource source;
private final MCMPRequestFactory requestFactory;
private final AdvertiseListenerFactory listenerFactory;
private final LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory;
private volatile boolean init;
- private LoadBalanceFactorProvider loadBalanceFactorProvider;
- private AdvertiseListener advertiseListener;
- private Map<String, Set<String>> excludedContextPaths;
+ private volatile LoadBalanceFactorProvider loadBalanceFactorProvider;
+ private volatile AdvertiseListener advertiseListener;
+ private volatile Map<String, Set<String>> excludedContextPaths;
public DefaultJBossWebEventHandler(NodeConfiguration nodeConfig, BalancerConfiguration
balancerConfig,
- MCMPHandlerConfiguration mcmpConfig, MCMPHandler mcmpHandler, MCMPRequestFactory
requestFactory,
- LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory,
AdvertiseListenerFactory listenerFactory)
+ MCMPHandlerConfiguration mcmpConfig, MCMPHandler mcmpHandler, ResetRequestSource
source,
+ MCMPRequestFactory requestFactory, LoadBalanceFactorProviderFactory
loadBalanceFactorProviderFactory,
+ AdvertiseListenerFactory listenerFactory)
{
this.nodeConfig = nodeConfig;
this.balancerConfig = balancerConfig;
this.mcmpConfig = mcmpConfig;
this.mcmpHandler = mcmpHandler;
+ this.source = source;
this.requestFactory = requestFactory;
this.loadBalanceFactorProviderFactory = loadBalanceFactorProviderFactory;
this.listenerFactory = listenerFactory;
@@ -90,13 +94,16 @@
// ---------------------------------------------------- JBossWebEventHandler
- public synchronized void init()
+ public synchronized void init(Server server)
{
List<InetSocketAddress> initialProxies =
Utils.parseProxies(this.mcmpConfig.getProxyList());
+
this.mcmpHandler.init(initialProxies);
this.excludedContextPaths =
Utils.parseContexts(this.mcmpConfig.getExcludedContexts());
+ this.source.init(server, this.excludedContextPaths);
+
this.loadBalanceFactorProvider =
this.loadBalanceFactorProviderFactory.createLoadBalanceFactorProvider();
Boolean advertise = this.mcmpConfig.getAdvertise();
@@ -138,7 +145,6 @@
}
this.mcmpHandler.shutdown();
- this.excludedContextPaths.clear();
}
/**
@@ -228,7 +234,6 @@
if (!this.exclude(context))
{
- log.info(context.getParent().getName() + ":" + context.getPath() +
" is *not* exluded.");
// Send ENABLE-APP if state is started
if (Utils.isContextStarted(context))
{
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandler.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandler.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandler.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -32,7 +32,8 @@
*/
public interface JBossWebEventHandler
{
- void init();
+ void init(Server server);
+
void shutdown();
void addContext(Context context);
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandlerAdapter.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandlerAdapter.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/JBossWebEventHandlerAdapter.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -119,10 +119,10 @@
{
if (source instanceof Server)
{
- this.eventHandler.init();
-
Server server = (Server) source;
+ this.eventHandler.init(server);
+
this.addListeners(server);
this.eventHandler.startServer(server);
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HAModClusterService.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HAModClusterService.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HAModClusterService.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -36,7 +36,6 @@
import org.apache.catalina.Engine;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.Server;
import org.apache.catalina.ServerFactory;
import org.apache.catalina.Service;
import org.apache.catalina.util.StringManager;
@@ -159,11 +158,11 @@
this.loadBalanceFactorProvider = loadFactorProvider;
this.requestFactory = new DefaultMCMPRequestFactory();
- this.resetRequestSource = new HASingletonAwareResetRequestSourceImpl(config,
config, config, this.requestFactory, this, this);
+ this.resetRequestSource = new HASingletonAwareResetRequestSourceImpl(config,
config, this.requestFactory, this, this);
this.localHandler = new DefaultMCMPHandler(config, this.resetRequestSource,
this.requestFactory);
this.clusteredHandler = new ClusteredMCMPHandlerImpl(this.localHandler, this,
this);
- JBossWebEventHandler eventHandler = new ClusteredJBossWebEventHandler(config,
config, config, this.clusteredHandler, this.requestFactory, this, new
AdvertiseListenerFactoryImpl());
+ JBossWebEventHandler eventHandler = new ClusteredJBossWebEventHandler(config,
config, config, this.clusteredHandler, this.resetRequestSource, this.requestFactory, this,
new AdvertiseListenerFactoryImpl());
this.lifecycleListener = new JBossWebEventHandlerAdapter(eventHandler);
@@ -728,21 +727,13 @@
* @param loadFactorProvider
*/
public ClusteredJBossWebEventHandler(NodeConfiguration nodeConfig,
BalancerConfiguration balancerConfig,
- MCMPHandlerConfiguration mcmpConfig, MCMPHandler clusteredHandler,
MCMPRequestFactory requestFactory,
- LoadBalanceFactorProviderFactory loadFactorProviderFactory,
AdvertiseListenerFactory listenerFactory)
+ MCMPHandlerConfiguration mcmpConfig, MCMPHandler clusteredHandler,
ResetRequestSource source,
+ MCMPRequestFactory requestFactory, LoadBalanceFactorProviderFactory
loadFactorProviderFactory,
+ AdvertiseListenerFactory listenerFactory)
{
- super(nodeConfig, balancerConfig, mcmpConfig, clusteredHandler, requestFactory,
loadFactorProviderFactory, listenerFactory);
+ super(nodeConfig, balancerConfig, mcmpConfig, clusteredHandler, source,
requestFactory, loadFactorProviderFactory, listenerFactory);
}
-
- @Override
- public void startServer(Server server)
- {
- // Pass on ref to our server
- this.coord.resetRequestSource.setJbossWebServer(server);
- super.startServer(server);
- }
-
@Override
protected void config(Engine engine)
{
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSource.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSource.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSource.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -25,7 +25,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.catalina.Server;
import org.jboss.modcluster.mcmp.MCMPRequest;
import org.jboss.modcluster.mcmp.ResetRequestSource;
@@ -36,6 +35,4 @@
public interface HASingletonAwareResetRequestSource extends ResetRequestSource
{
List<MCMPRequest> getLocalResetRequests(Map<String,
Set<ResetRequestSource.VirtualHost>> response);
-
- void setJbossWebServer(Server jbossWebServer);
}
\ No newline at end of file
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceImpl.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceImpl.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceImpl.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -22,13 +22,11 @@
package org.jboss.modcluster.ha;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.catalina.Server;
import org.apache.catalina.util.StringManager;
import org.jboss.ha.framework.interfaces.HAServiceKeyProvider;
import org.jboss.ha.framework.interfaces.HASingletonMBean;
@@ -36,7 +34,6 @@
import org.jboss.modcluster.Constants;
import org.jboss.modcluster.Utils;
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.ha.rpc.ResetRequestSourceRpcHandler;
@@ -68,11 +65,9 @@
private final HASingletonMBean singleton;
private final ResetRequestSourceRpcHandler<List<?>> rpcStub;
- private volatile Server server;
-
- public HASingletonAwareResetRequestSourceImpl(NodeConfiguration nodeConfig,
BalancerConfiguration balancerConfig, MCMPHandlerConfiguration mcmpConfig,
MCMPRequestFactory requestFactory, HASingletonMBean singleton, HAServiceKeyProvider
serviceKeyProvider)
+ public HASingletonAwareResetRequestSourceImpl(NodeConfiguration nodeConfig,
BalancerConfiguration balancerConfig, MCMPRequestFactory requestFactory, HASingletonMBean
singleton, HAServiceKeyProvider serviceKeyProvider)
{
- super(nodeConfig, balancerConfig, mcmpConfig, requestFactory);
+ super(nodeConfig, balancerConfig, requestFactory);
this.singleton = singleton;
this.rpcStub = new RpcStub(serviceKeyProvider);
@@ -97,22 +92,8 @@
*/
public List<MCMPRequest> getLocalResetRequests(Map<String,
Set<VirtualHost>> response)
{
- if (this.server == null)
- {
- return new ArrayList<MCMPRequest>();
- }
-
- return super.getResetRequests(response, this.server);
+ return super.getResetRequests(response);
}
-
- /**
- * @{inheritDoc}
- * @see
org.jboss.modcluster.ha.HASingletonAwareResetRequestSource#setJbossWebServer(org.apache.catalina.Server)
- */
- public void setJbossWebServer(Server server)
- {
- this.server = server;
- }
private void addRemoteRequests(List<MCMPRequest> resets, Map<String,
Set<VirtualHost>> resp)
{
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/ResetRequestSource.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/ResetRequestSource.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/ResetRequestSource.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -27,6 +27,8 @@
import java.util.Map;
import java.util.Set;
+import org.apache.catalina.Server;
+
/**
* Source for a list of requests that should be sent to an httpd-side
* mod_cluster instance when an {@link MCMPHandler} determines that
@@ -48,6 +50,8 @@
Map<String, Status> getContexts();
}
+ void init(Server server, Map<String, Set<String>> excludedContexts);
+
/**
* Gets a list of requests that should be sent to an httpd-side
* mod_cluster instance when an {@link MCMPHandler} determines that
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/ResetRequestSourceImpl.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/ResetRequestSourceImpl.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/ResetRequestSourceImpl.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -34,11 +34,9 @@
import org.apache.catalina.Engine;
import org.apache.catalina.Host;
import org.apache.catalina.Server;
-import org.apache.catalina.ServerFactory;
import org.apache.catalina.Service;
import org.jboss.modcluster.Utils;
import org.jboss.modcluster.config.BalancerConfiguration;
-import org.jboss.modcluster.config.MCMPHandlerConfiguration;
import org.jboss.modcluster.config.NodeConfiguration;
import org.jboss.modcluster.mcmp.MCMPRequest;
import org.jboss.modcluster.mcmp.MCMPRequestFactory;
@@ -53,35 +51,41 @@
{
private final NodeConfiguration nodeConfig;
private final BalancerConfiguration balancerConfig;
- private final MCMPHandlerConfiguration mcmpConfig;
private final MCMPRequestFactory requestFactory;
- public ResetRequestSourceImpl(NodeConfiguration nodeConfig, BalancerConfiguration
balancerConfig, MCMPHandlerConfiguration mcmpConfig, MCMPRequestFactory requestFactory)
+ private volatile Server server;
+ private volatile Map<String, Set<String>> excludedContexts;
+
+ public ResetRequestSourceImpl(NodeConfiguration nodeConfig, BalancerConfiguration
balancerConfig, MCMPRequestFactory requestFactory)
{
this.nodeConfig = nodeConfig;
this.balancerConfig = balancerConfig;
- this.mcmpConfig = mcmpConfig;
this.requestFactory = requestFactory;
}
/**
* @{inheritDoc}
+ * @see org.jboss.modcluster.mcmp.ResetRequestSource#init(java.util.Map)
+ */
+ public void init(Server server, Map<String, Set<String>>
excludedContexts)
+ {
+ this.server = server;
+ this.excludedContexts = excludedContexts;
+ }
+
+ /**
+ * @{inheritDoc}
* @see org.jboss.modcluster.mcmp.ResetRequestSource#getResetRequests(java.util.Map)
*/
public List<MCMPRequest> getResetRequests(Map<String,
Set<VirtualHost>> response)
{
- return this.getResetRequests(response, ServerFactory.getServer());
- }
-
- protected List<MCMPRequest> getResetRequests(Map<String,
Set<VirtualHost>> response, Server server)
- {
- // TODO This is a hack - we shouldn't have to parse the exclusion list every
time
- Map<String, Set<String>> excludedContexts =
Utils.parseContexts(this.mcmpConfig.getExcludedContexts());
+ List<MCMPRequest> requests = new ArrayList<MCMPRequest>();
- List<MCMPRequest> requests = new ArrayList<MCMPRequest>();
+ if (this.server == null) return requests;
+
List<MCMPRequest> engineRequests = new LinkedList<MCMPRequest>();
- for (Service service: server.findServices())
+ for (Service service: this.server.findServices())
{
Engine engine = (Engine) service.getContainer();
@@ -137,7 +141,7 @@
Context context = (Context) container;
String path = context.getPath();
- Set<String> excludedPaths = excludedContexts.get(hostName);
+ Set<String> excludedPaths = this.excludedContexts.get(hostName);
if ((excludedPaths != null) && excludedPaths.contains(path))
{
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -26,6 +26,7 @@
import java.net.InetSocketAddress;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.apache.catalina.Container;
@@ -35,6 +36,7 @@
import org.apache.catalina.Server;
import org.apache.catalina.Service;
import org.apache.catalina.connector.Connector;
+import org.easymock.Capture;
import org.easymock.EasyMock;
import org.jboss.modcluster.advertise.AdvertiseListener;
import org.jboss.modcluster.advertise.AdvertiseListenerFactory;
@@ -47,6 +49,7 @@
import org.jboss.modcluster.mcmp.MCMPRequest;
import org.jboss.modcluster.mcmp.MCMPRequestFactory;
import org.jboss.modcluster.mcmp.MCMPServerState;
+import org.jboss.modcluster.mcmp.ResetRequestSource;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -62,6 +65,7 @@
private final BalancerConfiguration balancerConfig =
EasyMock.createStrictMock(BalancerConfiguration.class);
private final MCMPHandlerConfiguration mcmpConfig =
EasyMock.createStrictMock(MCMPHandlerConfiguration.class);
private final MCMPHandler mcmpHandler = EasyMock.createStrictMock(MCMPHandler.class);
+ private final ResetRequestSource source =
EasyMock.createStrictMock(ResetRequestSource.class);
private final MCMPRequestFactory requestFactory =
EasyMock.createStrictMock(MCMPRequestFactory.class);
private final LoadBalanceFactorProviderFactory lbfProviderFactory =
EasyMock.createStrictMock(LoadBalanceFactorProviderFactory.class);
private final LoadBalanceFactorProvider lbfProvider =
EasyMock.createStrictMock(LoadBalanceFactorProvider.class);
@@ -73,14 +77,16 @@
@Before
public void construct() throws Exception
{
- this.handler = new DefaultJBossWebEventHandler(this.nodeConfig,
this.balancerConfig, this.mcmpConfig, this.mcmpHandler, this.requestFactory,
this.lbfProviderFactory, this.listenerFactory);
+ this.handler = new DefaultJBossWebEventHandler(this.nodeConfig,
this.balancerConfig, this.mcmpConfig, this.mcmpHandler, this.source, this.requestFactory,
this.lbfProviderFactory, this.listenerFactory);
}
@Test
public void initNoAdvertise() throws IOException
{
+ Server server = EasyMock.createStrictMock(Server.class);
InetAddress localAddress = InetAddress.getLocalHost();
String localHostName = localAddress.getHostName();
+ Map<String, Set<String>> emptyContextMap = Collections.emptyMap();
// Test advertise = false
EasyMock.expect(this.mcmpConfig.getProxyList()).andReturn(localHostName);
@@ -89,23 +95,27 @@
EasyMock.expect(this.mcmpConfig.getExcludedContexts()).andReturn(null);
+ this.source.init(server, emptyContextMap);
+
EasyMock.expect(this.lbfProviderFactory.createLoadBalanceFactorProvider()).andReturn(this.lbfProvider);
EasyMock.expect(this.mcmpConfig.getAdvertise()).andReturn(Boolean.FALSE);
- EasyMock.replay(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
+ EasyMock.replay(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory,
this.source);
- this.handler.init();
+ this.handler.init(server);
- EasyMock.verify(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
- EasyMock.reset(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
+ EasyMock.verify(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory,
this.source);
+ EasyMock.reset(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory,
this.source);
}
@Test
public void initAdvertise() throws IOException
{
+ Server server = EasyMock.createStrictMock(Server.class);
InetAddress localAddress = InetAddress.getLocalHost();
String localHostName = localAddress.getHostName();
+ Map<String, Set<String>> emptyContextMap = Collections.emptyMap();
// Test advertise = true
EasyMock.expect(this.mcmpConfig.getProxyList()).andReturn(localHostName);
@@ -114,6 +124,8 @@
EasyMock.expect(this.mcmpConfig.getExcludedContexts()).andReturn("");
+ this.source.init(server, emptyContextMap);
+
EasyMock.expect(this.lbfProviderFactory.createLoadBalanceFactorProvider()).andReturn(this.lbfProvider);
EasyMock.expect(this.mcmpConfig.getAdvertise()).andReturn(Boolean.TRUE);
@@ -122,17 +134,18 @@
this.listener.start();
- EasyMock.replay(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
+ EasyMock.replay(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
- this.handler.init();
+ this.handler.init(server);
- EasyMock.verify(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
- EasyMock.reset(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
+ EasyMock.verify(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
+ EasyMock.reset(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
}
@Test
public void init() throws IOException
{
+ Server server = EasyMock.createStrictMock(Server.class);
InetAddress localAddress = InetAddress.getLocalHost();
String localHostName = localAddress.getHostName();
@@ -143,13 +156,15 @@
EasyMock.expect(this.mcmpConfig.getExcludedContexts()).andReturn("ignored");
+ this.source.init(server, Collections.singletonMap("localhost",
Collections.singleton("/ignored")));
+
EasyMock.expect(this.lbfProviderFactory.createLoadBalanceFactorProvider()).andReturn(this.lbfProvider);
EasyMock.expect(this.mcmpConfig.getAdvertise()).andReturn(null);
EasyMock.replay(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
- this.handler.init();
+ this.handler.init(server);
EasyMock.verify(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
EasyMock.reset(this.mcmpHandler, this.mcmpConfig, this.lbfProviderFactory);
@@ -158,15 +173,19 @@
@Test
public void initNoProxies() throws IOException
{
+ Server server = EasyMock.createStrictMock(Server.class);
// Test advertise = null, no proxies configured
EasyMock.expect(this.mcmpConfig.getProxyList()).andReturn(null);
+ Capture<Map<String, Set<String>>> capturedMap = new
Capture<Map<String, Set<String>>>();
List<InetSocketAddress> emptyList = Collections.emptyList();
this.mcmpHandler.init(emptyList);
-
EasyMock.expect(this.mcmpConfig.getExcludedContexts()).andReturn("ignored,ROOT");
+
EasyMock.expect(this.mcmpConfig.getExcludedContexts()).andReturn("host1:ignored,ROOT");
+ this.source.init(EasyMock.same(server), EasyMock.capture(capturedMap));
+
EasyMock.expect(this.lbfProviderFactory.createLoadBalanceFactorProvider()).andReturn(this.lbfProvider);
EasyMock.expect(this.mcmpConfig.getAdvertise()).andReturn(null);
@@ -175,12 +194,19 @@
this.listener.start();
- EasyMock.replay(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
+ EasyMock.replay(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
- this.handler.init();
+ this.handler.init(server);
- EasyMock.verify(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
- EasyMock.reset(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener);
+ EasyMock.verify(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
+
+ Map<String, Set<String>> contexts = capturedMap.getValue();
+
+ Assert.assertEquals(2, contexts.size());
+ Assert.assertEquals(Collections.singleton("/ignored"),
contexts.get("host1"));
+ Assert.assertEquals(Collections.singleton(""),
contexts.get("localhost"));
+
+ EasyMock.reset(this.mcmpHandler, this.listenerFactory, this.mcmpConfig,
this.lbfProviderFactory, this.listener, this.source);
}
@Test
@@ -244,17 +270,21 @@
public void addContextIgnored() throws IOException
{
Context context = EasyMock.createStrictMock(Context.class);
+ Host host = EasyMock.createStrictMock(Host.class);
init();
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/ignored");
- EasyMock.replay(context);
+ EasyMock.replay(context, host);
this.handler.addContext(context);
- EasyMock.verify(context);
- EasyMock.reset(context);
+ EasyMock.verify(context, host);
+ EasyMock.reset(context, host);
}
@Test
@@ -264,11 +294,10 @@
Host host = EasyMock.createStrictMock(Host.class);
init();
-
- // Test context not started
- EasyMock.expect(context.getPath()).andReturn("/context");
+
+ // Exclusion check
EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("host");
+ EasyMock.expect(host.getName()).andReturn("host1");
EasyMock.expect(context.isStarted()).andReturn(false);
@@ -289,13 +318,18 @@
init();
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
+ EasyMock.expect(context.getPath()).andReturn("/context");
+
+ EasyMock.expect(context.isStarted()).andReturn(true);
+
// Expect log message
EasyMock.expect(context.getPath()).andReturn("/context");
EasyMock.expect(context.getParent()).andReturn(host);
EasyMock.expect(host.getName()).andReturn("host");
- EasyMock.expect(context.isStarted()).andReturn(true);
-
EasyMock.expect(this.requestFactory.createEnableRequest(context)).andReturn(request);
this.mcmpHandler.sendRequest(request);
@@ -327,25 +361,26 @@
}
EasyMock.verify(context);
- EasyMock.reset(context);
}
@Test
public void startContextIgnored() throws IOException
{
Context context = EasyMock.createStrictMock(Context.class);
+ Host host = EasyMock.createStrictMock(Host.class);
init();
- // Test ignored context
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/ignored");
- EasyMock.replay(context);
+ EasyMock.replay(context, host);
this.handler.startContext(context);
- EasyMock.verify(context);
- EasyMock.reset(context);
+ EasyMock.verify(context, host);
}
@Test
@@ -357,6 +392,11 @@
init();
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
+ EasyMock.expect(context.getPath()).andReturn("/context");
+
// Expect log message
EasyMock.expect(context.getPath()).andReturn("/context");
EasyMock.expect(context.getParent()).andReturn(host);
@@ -393,25 +433,26 @@
}
EasyMock.verify(context);
- EasyMock.reset(context);
}
@Test
public void stopContextIgnored() throws IOException
{
Context context = EasyMock.createStrictMock(Context.class);
+ Host host = EasyMock.createStrictMock(Host.class);
init();
- // Test ignored context
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/ignored");
- EasyMock.replay(context);
+ EasyMock.replay(context, host);
this.handler.stopContext(context);
- EasyMock.verify(context);
- EasyMock.reset(context);
+ EasyMock.verify(context, host);
}
@Test
@@ -423,10 +464,15 @@
init();
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
+ EasyMock.expect(context.getPath()).andReturn("/context");
+
// Expect log message
EasyMock.expect(context.getPath()).andReturn("/context");
EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("host");
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(this.requestFactory.createStopRequest(context)).andReturn(request);
@@ -459,25 +505,26 @@
}
EasyMock.verify(context);
- EasyMock.reset(context);
}
@Test
public void removeContextIgnored() throws IOException
{
Context context = EasyMock.createStrictMock(Context.class);
+ Host host = EasyMock.createStrictMock(Host.class);
init();
- // Test ignored context
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/ignored");
- EasyMock.replay(context);
+ EasyMock.replay(context, host);
this.handler.removeContext(context);
- EasyMock.verify(context);
- EasyMock.reset(context);
+ EasyMock.verify(context, host);
}
@Test
@@ -489,11 +536,10 @@
init();
- // Test initialized - no jvm route
-
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/context");
- EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("parent-container");
EasyMock.expect(context.getParent()).andReturn(host);
EasyMock.expect(host.getParent()).andReturn(engine);
@@ -504,7 +550,6 @@
this.handler.removeContext(context);
EasyMock.verify(context, host, engine);
- EasyMock.reset(context, host, engine);
}
@Test
@@ -516,17 +561,22 @@
MCMPRequest request = EasyMock.createStrictMock(MCMPRequest.class);
init();
-
- // Expect log message
+
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/context");
- EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("host");
// jvm route null check
EasyMock.expect(context.getParent()).andReturn(host);
EasyMock.expect(host.getParent()).andReturn(engine);
EasyMock.expect(engine.getJvmRoute()).andReturn("host1");
+ // Expect log message
+ EasyMock.expect(context.getPath()).andReturn("/context");
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("host");
+
EasyMock.expect(this.requestFactory.createRemoveRequest(context)).andReturn(request);
this.mcmpHandler.sendRequest(request);
@@ -643,10 +693,11 @@
EasyMock.expect(engine.findChildren()).andReturn(new Container[] { host });
EasyMock.expect(host.findChildren()).andReturn(new Container[] { context });
-
+
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/context");
- EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("host");
EasyMock.expect(context.isStarted()).andReturn(false);
@@ -698,26 +749,31 @@
EasyMock.expect(engine.findChildren()).andReturn(new Container[] { host });
EasyMock.expect(host.findChildren()).andReturn(new Container[] { context });
-
- // Expect log message
+
+ // Exclusion check
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("localhost");
EasyMock.expect(context.getPath()).andReturn("/context");
- EasyMock.expect(context.getParent()).andReturn(host);
- EasyMock.expect(host.getName()).andReturn("host");
// jvm route null check
EasyMock.expect(context.getParent()).andReturn(host);
EasyMock.expect(host.getParent()).andReturn(engine);
EasyMock.expect(engine.getJvmRoute()).andReturn("host1");
+ // Expect log message
+ EasyMock.expect(context.getPath()).andReturn("/context");
+ EasyMock.expect(context.getParent()).andReturn(host);
+ EasyMock.expect(host.getName()).andReturn("host");
+
EasyMock.expect(this.requestFactory.createRemoveRequest(context)).andReturn(contextRequest);
this.mcmpHandler.sendRequest(contextRequest);
+ EasyMock.expect(engine.getJvmRoute()).andReturn("host1");
+
// Expect log message
EasyMock.expect(engine.getName()).andReturn("engine");
- EasyMock.expect(engine.getJvmRoute()).andReturn("host1");
-
EasyMock.expect(this.requestFactory.createRemoveRequest(engine)).andReturn(engineRequest);
this.mcmpHandler.sendRequest(engineRequest);
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java 2009-01-27
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -143,7 +143,7 @@
LifecycleEvent event = new LifecycleEvent(server, Lifecycle.AFTER_START_EVENT);
- this.eventHandler.init();
+ this.eventHandler.init(server);
EasyMock.expect(server.findServices()).andReturn(new Service[] { service });
EasyMock.expect(service.getContainer()).andReturn(engine);
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
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -40,7 +40,6 @@
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;
@@ -58,7 +57,6 @@
{
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);
@@ -67,7 +65,7 @@
@Test
public void getResetRequestsNonMaster()
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
EasyMock.expect(this.singleton.isMasterNode()).andReturn(false);
@@ -85,9 +83,9 @@
}
@Test
- public void getResetRequestsNoServer() throws Exception
+ public void getResetRequestsNoInit() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
@@ -118,9 +116,10 @@
@Test
public void getResetRequests() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
+ Map<String, Set<String>> emptyContextMap = Collections.emptyMap();
MCMPRequest request1 = EasyMock.createMock(MCMPRequest.class);
MCMPRequest request2 = EasyMock.createMock(MCMPRequest.class);
@@ -135,7 +134,7 @@
MCMPRequest configRequest = EasyMock.createStrictMock(MCMPRequest.class);
MCMPRequest contextRequest = EasyMock.createStrictMock(MCMPRequest.class);
- source.setJbossWebServer(server);
+ source.init(server, emptyContextMap);
EasyMock.expect(this.singleton.isMasterNode()).andReturn(true);
@@ -176,9 +175,9 @@
}
@Test
- public void getLocalResetRequestsNoServer() throws Exception
+ public void getLocalResetRequestsNoInit() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
@@ -196,9 +195,10 @@
@Test
public void getLocalResetRequests() throws Exception
{
- HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.mcmpConfig, this.requestFactory, this.singleton, this.key);
+ HASingletonAwareResetRequestSource source = new
HASingletonAwareResetRequestSourceImpl(this.nodeConfig, this.balancerConfig,
this.requestFactory, this.singleton, this.key);
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
+ Map<String, Set<String>> emptyContextMap = Collections.emptyMap();
// Test w/server
Server server = EasyMock.createStrictMock(Server.class);
@@ -208,9 +208,9 @@
Host host = EasyMock.createStrictMock(Host.class);
MCMPRequest configRequest = EasyMock.createStrictMock(MCMPRequest.class);
MCMPRequest contextRequest = EasyMock.createStrictMock(MCMPRequest.class);
+
+ source.init(server, emptyContextMap);
- source.setJbossWebServer(server);
-
EasyMock.expect(server.findServices()).andReturn(new Service[] { service });
EasyMock.expect(service.getContainer()).andReturn(engine);
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
16:17:30 UTC (rev 2224)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/mcmp/ResetRequestSourceTestCase.java 2009-01-27
18:15:24 UTC (rev 2225)
@@ -30,11 +30,10 @@
import org.apache.catalina.Context;
import org.apache.catalina.Engine;
import org.apache.catalina.Host;
+import org.apache.catalina.Server;
import org.apache.catalina.Service;
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;
@@ -46,25 +45,38 @@
*/
public class ResetRequestSourceTestCase
{
- private static final ModClusterServiceTestCase.LifecycleServer server =
ModClusterServiceTestCase.server;
-
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.mcmpConfig, this.requestFactory);
+ @Test
+ public void testGetResetRequestsNoInit()
+ {
+ ResetRequestSource source = new ResetRequestSourceImpl(this.nodeConfig,
this.balancerConfig, this.requestFactory);
+
+ Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
+
+ List<MCMPRequest> requests = source.getResetRequests(emptyResponseMap);
+
+ Assert.assertTrue(requests.isEmpty());
+ }
@Test
public void testGetResetRequests() throws Exception
{
+ ResetRequestSource source = new ResetRequestSourceImpl(this.nodeConfig,
this.balancerConfig, this.requestFactory);
+
+ Server server = EasyMock.createStrictMock(Server.class);
Service service = EasyMock.createStrictMock(Service.class);
Engine engine = EasyMock.createStrictMock(Engine.class);
Host host = EasyMock.createStrictMock(Host.class);
Context context = EasyMock.createStrictMock(Context.class);
MCMPRequest configRequest = EasyMock.createStrictMock(MCMPRequest.class);
MCMPRequest contextRequest = EasyMock.createStrictMock(MCMPRequest.class);
+ Map<String, Set<String>> emptyContextMap = Collections.emptyMap();
+ source.init(server, emptyContextMap);
+
EasyMock.expect(server.findServices()).andReturn(new Service[] { service });
EasyMock.expect(service.getContainer()).andReturn(engine);
@@ -85,7 +97,7 @@
Map<String, Set<ResetRequestSource.VirtualHost>> emptyResponseMap =
Collections.emptyMap();
- List<MCMPRequest> requests = this.source.getResetRequests(emptyResponseMap);
+ List<MCMPRequest> requests = source.getResetRequests(emptyResponseMap);
EasyMock.verify(server, this.requestFactory, service, engine, host, context,
this.nodeConfig, this.balancerConfig);