Author: pferraro
Date: 2008-12-18 15:56:28 -0500 (Thu, 18 Dec 2008)
New Revision: 2159
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java
Log:
Use BEFORE_STOP_EVENT, instead of STOP_EVENT to inform mod_cluster of shutdown ASAP.
On stopServer(Server) remove contexts before engine.
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java 2008-12-18
20:32:11 UTC (rev 2158)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java 2008-12-18
20:56:28 UTC (rev 2159)
@@ -724,6 +724,10 @@
EasyMock.expect(server.findServices()).andReturn(new Service[] { service });
EasyMock.expect(service.getContainer()).andReturn(engine);
+ EasyMock.expect(engine.findChildren()).andReturn(new Container[] { container });
+ EasyMock.expect(container.findChildren()).andReturn(new Container[] { context });
+ this.recordRemoveContext(context, container, engine);
+
// Expect log message
EasyMock.expect(engine.getName()).andReturn("engine");
@@ -731,10 +735,6 @@
this.mcmpHandler.sendRequest(EasyMock.capture(capturedRequest));
- EasyMock.expect(engine.findChildren()).andReturn(new Container[] { container });
- EasyMock.expect(container.findChildren()).andReturn(new Container[] { context });
- this.recordRemoveContext(context, container, engine);
-
EasyMock.replay(this.mcmpHandler, this.nodeConfig, this.balancerConfig, server,
service, engine, container, context);
this.handler.stopServer(server);
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java
===================================================================
---
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java 2008-12-18
20:32:11 UTC (rev 2158)
+++
trunk/mod_cluster/src/test/java/org/jboss/modcluster/JBossWebEventHandlerAdapterTestCase.java 2008-12-18
20:56:28 UTC (rev 2159)
@@ -174,7 +174,7 @@
{
LifecycleContext context = EasyMock.createStrictMock(LifecycleContext.class);
- LifecycleEvent event = new LifecycleEvent(context, Lifecycle.STOP_EVENT);
+ LifecycleEvent event = new LifecycleEvent(context, Lifecycle.BEFORE_STOP_EVENT);
this.eventHandler.stopContext(context);
@@ -195,7 +195,7 @@
Container container = EasyMock.createStrictMock(Container.class);
LifecycleContainer childContainer =
EasyMock.createStrictMock(LifecycleContainer.class);
- LifecycleEvent event = new LifecycleEvent(server, Lifecycle.STOP_EVENT);
+ LifecycleEvent event = new LifecycleEvent(server, Lifecycle.BEFORE_STOP_EVENT);
EasyMock.expect(server.findServices()).andReturn(new Service[] { service });
EasyMock.expect(service.getContainer()).andReturn(engine);
Show replies by date