[jboss-cvs] JBoss Messaging SVN: r2367 - branches/Branch_Bisocket_Experiment2/tests/src/org/jboss/test/thirdparty/remoting.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 20 04:39:51 EST 2007


Author: ron_sigal
Date: 2007-02-20 04:39:51 -0500 (Tue, 20 Feb 2007)
New Revision: 2367

Modified:
   branches/Branch_Bisocket_Experiment2/tests/src/org/jboss/test/thirdparty/remoting/CallbackServerTimeoutTest.java
Log:
Protect against reusing a preexisting server.

Modified: branches/Branch_Bisocket_Experiment2/tests/src/org/jboss/test/thirdparty/remoting/CallbackServerTimeoutTest.java
===================================================================
--- branches/Branch_Bisocket_Experiment2/tests/src/org/jboss/test/thirdparty/remoting/CallbackServerTimeoutTest.java	2007-02-20 07:13:04 UTC (rev 2366)
+++ branches/Branch_Bisocket_Experiment2/tests/src/org/jboss/test/thirdparty/remoting/CallbackServerTimeoutTest.java	2007-02-20 09:39:51 UTC (rev 2367)
@@ -48,6 +48,7 @@
    // Attributes -----------------------------------------------------------------------------------
 
    private InvokerLocator serverLocator;
+   private boolean firstTime = true;
 
    // Constructors ---------------------------------------------------------------------------------
 
@@ -113,10 +114,9 @@
       {
          if (client != null)
          {
-            // Note.  Calling Client.disconnect() does remove the InvokerCallbackHandler
-            // registered above.  For the http transport, the CallbackPoller will continue 
-            // running, which will generate a lot of ERROR log messages after the server
-            // has shut down.
+            // Note. Calling Client.disconnect() does not remove the InvokerCallbackHandler registered
+            // above. For the http transport, the CallbackPoller will continue running, which will
+            // generate a lot of ERROR log messages after the server has shut down.
             client.removeListener(callbackHandler);
             client.disconnect();
          }
@@ -198,6 +198,14 @@
    {
       super.setUp();
 
+      // This test needs a special server, so make sure no other test left a server running.
+      if (firstTime)
+      {
+         firstTime = false;
+         ServerManagement.start(0, "remoting", null, true, false);
+         ServerManagement.stop();
+      }
+      
       // start a "standard" (messaging-enabled) remoting, we need to strip off the
       // marshaller/unmarshaller, though, since it can only bring trouble to this test ...
       ServiceAttributeOverrides sao = new ServiceAttributeOverrides();




More information about the jboss-cvs-commits mailing list