[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex ...
Ron Sigal
ron_sigal at yahoo.com
Mon Nov 6 19:24:42 EST 2006
User: rsigal
Date: 06/11/06 19:24:42
Modified: src/tests/org/jboss/test/remoting/transport/multiplex Tag:
remoting_2_x
MultiplexInvokerShutdownTestServer.java
MultiplexInvokerShutdownTestClient.java
Log:
JBREM-627: Added an event so the client will not shut down until the server tells it that the server's test is complete.
Revision Changes Path
No revision
No revision
1.3.8.1 +7 -3 JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/MultiplexInvokerShutdownTestServer.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MultiplexInvokerShutdownTestServer.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/MultiplexInvokerShutdownTestServer.java,v
retrieving revision 1.3
retrieving revision 1.3.8.1
diff -u -b -r1.3 -r1.3.8.1
--- MultiplexInvokerShutdownTestServer.java 21 Mar 2006 05:40:58 -0000 1.3
+++ MultiplexInvokerShutdownTestServer.java 7 Nov 2006 00:24:42 -0000 1.3.8.1
@@ -46,7 +46,7 @@
* A MultiplexInvokerShutdownTestServer.
* @author <a href="mailto:r.sigal at computer.org">Ron Sigal</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.3.8.1 $
* <p>
* Copyright (c) 2005
* </p>
@@ -57,7 +57,8 @@
public static final String locatorString = "multiplex://localhost:5281";
public static final String CREATED_EVENT = "clientsCreatedEvent";
public static final String SHUTDOWN_CONSENT_EVENT = "serverConsentShutdownEvent";
- public static final String SHUTDOWN_EVENT = "clientsShutdownEvent";
+ public static final String CLIENT_SHUTDOWN_EVENT = "clientsShutdownEvent";
+ public static final String SERVER_SHUTDOWN_EVENT = "servdrShutdownEvent";
private static final Logger log = Logger.getLogger(MultiplexInvokerShutdownTestServer.class);
private static EventRegistry_Impl eventRegistry;
@@ -118,7 +119,7 @@
assertTrue(MultiplexingManager.checkForManagerByAddressPair(localAddress, remoteAddress));
eventRegistry.postEvent(SHUTDOWN_CONSENT_EVENT);
- eventRegistry.waitOnEvent(SHUTDOWN_EVENT);
+ eventRegistry.waitOnEvent(CLIENT_SHUTDOWN_EVENT);
for (int i = 0; i < 3; i++)
{
@@ -140,6 +141,9 @@
}
assertFalse(MultiplexingManager.checkForManagerByAddressPair(localAddress, remoteAddress));
+
+ // Tell client that server is done and it's OK to shut down.
+ eventRegistry.postEvent(SERVER_SHUTDOWN_EVENT);
}
catch (Exception e)
{
1.4.4.1 +5 -2 JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/MultiplexInvokerShutdownTestClient.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MultiplexInvokerShutdownTestClient.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/multiplex/MultiplexInvokerShutdownTestClient.java,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -b -r1.4 -r1.4.4.1
--- MultiplexInvokerShutdownTestClient.java 2 May 2006 15:37:31 -0000 1.4
+++ MultiplexInvokerShutdownTestClient.java 7 Nov 2006 00:24:42 -0000 1.4.4.1
@@ -36,7 +36,7 @@
/**
* @author <a href="mailto:r.sigal at computer.org">Ron Sigal</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.4.4.1 $
* <p>
* Copyright (c) 2005
* </p>
@@ -100,7 +100,10 @@
client.disconnect();
// Post shutdown event.
- eventRegistry.postEvent(MultiplexInvokerShutdownTestServer.SHUTDOWN_EVENT);
+ eventRegistry.postEvent(MultiplexInvokerShutdownTestServer.CLIENT_SHUTDOWN_EVENT);
+
+ // Wait for server to shut down, so TestDriver doesn't it it down from above..
+ eventRegistry.waitOnEvent(MultiplexInvokerShutdownTestServer.SERVER_SHUTDOWN_EVENT);
}
catch (Throwable e)
{
More information about the jboss-cvs-commits
mailing list