[jboss-cvs] JBoss Messaging SVN: r2216 - in branches/Branch_1_0_1_SP/tests: src/org/jboss/test/thirdparty/remoting and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 8 18:05:47 EST 2007


Author: ovidiu.feodorov at jboss.com
Date: 2007-02-08 18:05:47 -0500 (Thu, 08 Feb 2007)
New Revision: 2216

Added:
   branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/LazySubsystem.java
Modified:
   branches/Branch_1_0_1_SP/tests/bin/stop-rmi-server
   branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java
Log:
adding a test for http://jira.jboss.org/jira/browse/JBMESSAGING-787, http://jira.jboss.org/jira/browse/JBREM-691 on the SP branch too

Modified: branches/Branch_1_0_1_SP/tests/bin/stop-rmi-server
===================================================================
--- branches/Branch_1_0_1_SP/tests/bin/stop-rmi-server	2007-02-08 22:52:03 UTC (rev 2215)
+++ branches/Branch_1_0_1_SP/tests/bin/stop-rmi-server	2007-02-08 23:05:47 UTC (rev 2216)
@@ -31,7 +31,7 @@
     shift
 done
 
-JAVA_OPTS="$JAVA_OPTS -Dmodule.output=$reldir/../output/logs -Dtest.logfile.suffix=stop-rmi-server""
+JAVA_OPTS="$JAVA_OPTS -Dmodule.output=$reldir/../output/logs -Dtest.logfile.suffix=stop-rmi-server"
 
 if [ "$USE_EXISTENT_TEST_CLASSPATH_FILE" = "true" ]; then
    CLASSPATH_FILE="$reldir/.test.execution.classpath"
@@ -49,3 +49,4 @@
 
 java $JAVA_OPTS -cp $CLASSPATH -Dtest.bind.address=localhost \
 org.jboss.test.messaging.tools.jmx.rmi.StopRMIServer
+

Modified: branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java
===================================================================
--- branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java	2007-02-08 22:52:03 UTC (rev 2215)
+++ branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/ClientInvokerTimeoutTest.java	2007-02-08 23:05:47 UTC (rev 2216)
@@ -167,7 +167,7 @@
          fail("This test should be run in a remote configuration!");
       }
 
-      ServerManagement.start("remoting");
+      ServerManagement.start("all");
 
       // obtain the server locator from the service itself, so we won't have any doubts we use
       // the right one

Added: branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/LazySubsystem.java
===================================================================
--- branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/LazySubsystem.java	                        (rev 0)
+++ branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/LazySubsystem.java	2007-02-08 23:05:47 UTC (rev 2216)
@@ -0,0 +1,93 @@
+/**
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.test.thirdparty.remoting;
+
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.test.thirdparty.remoting.util.TestableSubsystem;
+import org.jboss.logging.Logger;
+
+import javax.management.MBeanServer;
+
+/**
+ * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
+ * @version <tt>$Revision: 2107 $</tt>
+ *
+ * $Id: LazySubsystem.java 2107 2007-01-30 07:46:44Z ovidiu.feodorov at jboss.com $
+ */
+public class LazySubsystem implements ServerInvocationHandler, TestableSubsystem
+{
+   // Constants ------------------------------------------------------------------------------------
+
+   private static final Logger log = Logger.getLogger(LazySubsystem.class);
+
+   // Static ---------------------------------------------------------------------------------------
+
+   // Attributes -----------------------------------------------------------------------------------
+
+   // Constructors ---------------------------------------------------------------------------------
+
+   public LazySubsystem()
+   {
+   }
+
+   // ServerInvocationHandler implementation -------------------------------------------------------
+
+   public void setMBeanServer(MBeanServer server)
+   {
+   }
+
+   public void setInvoker(ServerInvoker invoker)
+   {
+   }
+
+   public Object invoke(InvocationRequest invocation) throws Throwable
+   {
+      long sleepTime = ((Long)invocation.getParameter()).longValue();
+
+      log.debug("sleeping for " + (sleepTime / 1000) + " seconds ...");
+
+      Thread.sleep(sleepTime);
+
+      log.debug("woke up");
+      
+      return null;
+   }
+
+   public void addListener(InvokerCallbackHandler callbackHandler)
+   {
+   }
+
+   public void removeListener(InvokerCallbackHandler callbackHandler)
+   {
+   }
+
+   // TestableSubsystem implementation ----------------------------------------------------------
+
+   public InvocationRequest getNextInvocation(long timeout) throws InterruptedException
+   {
+      return null;
+   }
+
+   public boolean isFailed()
+   {
+      return false;
+   }
+
+   // Public ---------------------------------------------------------------------------------------
+
+   // Package protected ----------------------------------------------------------------------------
+
+   // Protected ------------------------------------------------------------------------------------
+
+   // Private --------------------------------------------------------------------------------------
+
+   // Inner classes --------------------------------------------------------------------------------
+}
+


Property changes on: branches/Branch_1_0_1_SP/tests/src/org/jboss/test/thirdparty/remoting/LazySubsystem.java
___________________________________________________________________
Name: svn:keywords
   + "Id LastChangedDate Author Revision"




More information about the jboss-cvs-commits mailing list