[jboss-cvs] JBossAS SVN: r89817 - branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 4 08:34:37 EDT 2009


Author: emuckenhuber
Date: 2009-06-04 08:34:37 -0400 (Thu, 04 Jun 2009)
New Revision: 89817

Modified:
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
[JBAS-6960] add test for lifecycle operations

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-06-04 12:30:20 UTC (rev 89816)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-06-04 12:34:37 UTC (rev 89817)
@@ -113,6 +113,7 @@
       suite.addTest(new JmsDestinationUnitTestCase("testCreateQueue"));
       suite.addTest(new JmsDestinationUnitTestCase("testQueueMetrics"));
       suite.addTest(new JmsDestinationUnitTestCase("testQueueOperations"));
+      suite.addTest(new JmsDestinationUnitTestCase("testQueueRestart"));
       suite.addTest(new JmsDestinationUnitTestCase("testRemoveQueue"));
       suite.addTest(new JmsDestinationUnitTestCase("testCreateTopic"));
       suite.addTest(new JmsDestinationUnitTestCase("testTopicMetrics"));
@@ -227,6 +228,22 @@
       assertNotNull("null operation return value", v);
       log.debug("result" + v);
    }
+   
+   public void testQueueRestart() throws Exception
+   {
+      ManagedComponent component = getManagementView().getComponent("testCreateQueue", QueueType);
+      assertEquals(RunState.RUNNING, component.getRunState());
+      ManagedOperation o = getOperation(component, "stop", new String[0]);
+      o.invoke(new MetaValue[0]);
+      
+      // TODO this should not require a reload?
+      getManagementView().reload();
+      
+      component = getManagementView().getComponent("testCreateQueue", QueueType);
+      assertEquals(RunState.STOPPED, component.getRunState());
+      o = getOperation(component, "start", new String[0]);
+      o.invoke(new MetaValue[0]);
+   }
 
    public void testMultipleQueues() throws Exception
    {




More information about the jboss-cvs-commits mailing list