[Jboss-cvs] JBossAS SVN: r56694 - trunk/testsuite/src/main/org/jboss/test/jmx/test

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Sep 9 11:06:55 EDT 2006


Author: dimitris at jboss.org
Date: 2006-09-09 11:06:52 -0400 (Sat, 09 Sep 2006)
New Revision: 56694

Modified:
   trunk/testsuite/src/main/org/jboss/test/jmx/test/JMXInvokerUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
Log:
JBAS-3605, the execution order of tests is important, so it must be defined explicitly when running under some JVMs

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/JMXInvokerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/JMXInvokerUnitTestCase.java	2006-09-09 14:21:22 UTC (rev 56693)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/JMXInvokerUnitTestCase.java	2006-09-09 15:06:52 UTC (rev 56694)
@@ -1,41 +1,43 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.test.jmx.test;
 
 import javax.management.Attribute;
+import javax.management.ListenerNotFoundException;
 import javax.management.MBeanInfo;
 import javax.management.MBeanServerConnection;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
-import javax.management.ListenerNotFoundException;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
 import org.jboss.test.JBossTestCase;
 import org.jboss.test.jmx.invoker.CustomClass;
 import org.jboss.test.jmx.invoker.InvokerTestMBean;
+import org.jboss.test.jmx.invoker.RMIBadListener;
 import org.jboss.test.jmx.invoker.RMIListener;
-import org.jboss.test.jmx.invoker.RMIBadListener;
 
 /**
  * Tests for the jmx invoker adaptor.
@@ -45,18 +47,29 @@
  * @author <a href="mailto:tom at jboss.com">Tom Elrod</a>
  * @version $Revision$
  */
-public class JMXInvokerUnitTestCase
-   extends JBossTestCase
+public class JMXInvokerUnitTestCase extends JBossTestCase
 {
    public JMXInvokerUnitTestCase(String name)
    {
       super(name);
    }
 
-   public static Test suite()
-      throws Exception
+   public static Test suite() throws Exception
    {
-      return getDeploySetup(JMXInvokerUnitTestCase.class, "invoker-adaptor-test.ear");
+      // JBAS-3605, the execution order of tests in this test case is important
+      // so it must be defined explicitly when running under some JVMs
+      TestSuite suite = new TestSuite();
+      suite.addTest(new JMXInvokerUnitTestCase("testGetSomething"));
+      suite.addTest(new JMXInvokerUnitTestCase("testGetCustom"));
+      suite.addTest(new JMXInvokerUnitTestCase("testGetCustomXMBean"));
+      suite.addTest(new JMXInvokerUnitTestCase("testGetXMBeanInfo"));
+      suite.addTest(new JMXInvokerUnitTestCase("testXMBeanDoSomething"));
+      suite.addTest(new JMXInvokerUnitTestCase("testSetCustom"));
+      suite.addTest(new JMXInvokerUnitTestCase("testClassNotFoundException"));
+      suite.addTest(new JMXInvokerUnitTestCase("testNotification"));
+      suite.addTest(new JMXInvokerUnitTestCase("testNotificationWithBadListener"));
+      
+      return getDeploySetup(suite, "invoker-adaptor-test.ear");
    }
 
    /**

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2006-09-09 14:21:22 UTC (rev 56693)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2006-09-09 15:06:52 UTC (rev 56694)
@@ -1,48 +1,60 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.test.jmx.test;
 
+import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
 
 import junit.framework.Test;
+import junit.framework.TestSuite;
 
 /** Tests for the jmx invoker adaptor with a secured xmbean.
  *
  * @author Scott.Stark at jboss.org
  * @version $Revision$
  */
-public class SecureJMXInvokerUnitTestCase
-   extends JMXInvokerUnitTestCase
+public class SecureJMXInvokerUnitTestCase extends JMXInvokerUnitTestCase
 {
    public SecureJMXInvokerUnitTestCase(String name)
    {
       super(name);
    }
 
-   public static Test suite()
-      throws Exception
+   public static Test suite() throws Exception
    {
-      return getDeploySetup(SecureJMXInvokerUnitTestCase.class, "invoker-adaptor-test.ear");
+      // JBAS-3605, the execution order of tests in this test case is important
+      // so it must be defined explicitly when running under some JVMs
+      TestSuite suite = new TestSuite();
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testGetSomething"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testGetCustom"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testGetCustomXMBean"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testGetXMBeanInfo"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testXMBeanDoSomething"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testSetCustom"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testClassNotFoundException"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testNotification"));
+      suite.addTest(new SecureJMXInvokerUnitTestCase("testNotificationWithBadListener"));
+      
+      return getDeploySetup(suite, "invoker-adaptor-test.ear");
    }
 
    ObjectName getObjectName() throws MalformedObjectNameException




More information about the jboss-cvs-commits mailing list