[jboss-cvs] JBossAS SVN: r64278 - branches/Branch_4_4/testsuite/src/main/org/jboss/test/jbossmessaging/perf.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 25 14:11:38 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-07-25 14:11:38 -0400 (Wed, 25 Jul 2007)
New Revision: 64278

Modified:
   branches/Branch_4_4/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
Log:
Fixing tests

Modified: branches/Branch_4_4/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java
===================================================================
--- branches/Branch_4_4/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2007-07-25 18:10:42 UTC (rev 64277)
+++ branches/Branch_4_4/testsuite/src/main/org/jboss/test/jbossmessaging/perf/JMSPerfStressTestCase.java	2007-07-25 18:11:38 UTC (rev 64278)
@@ -708,29 +708,35 @@
     */
    protected void setUp() throws Exception
    {
-       // perform any setUp() required by the base class
-       super.setUp() ;
+	   // perform any setUp() required by the base class
+	   super.setUp() ;
 
-      if (context == null)
-      {
-	  Logger log = getLog() ;
-	  if (log == null)
-	      System.out.println("JMSPerfStressTestCase: getLog() returned null") ;
+	   if (context == null)
+	   {
+		   Logger log = getLog() ;
+		   if (log == null)
+			   System.out.println("JMSPerfStressTestCase: getLog() returned null") ;
 
-	 getLog().debug("JMSPerfStresTestCase - setUp") ;
-	 
-         context = getInitialContext();
+		   getLog().debug("JMSPerfStresTestCase - setUp") ;
 
-         QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup(QUEUE_FACTORY);
-         queueConnection = queueFactory.createQueueConnection();
+		   context = getInitialContext();
+	   }
 
-         TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
-         topicConnection = topicFactory.createTopicConnection();
+	   QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup(QUEUE_FACTORY);
+	   queueConnection = queueFactory.createQueueConnection();
 
-         getLog().debug("Connection to JMS provider established.");
-      }
+	   TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup(TOPIC_FACTORY);
+	   topicConnection = topicFactory.createTopicConnection();
 
+	   getLog().debug("Connection to JMS provider established.");
+
    }
+   
+   protected void tearDown() throws Exception
+   {
+	   try {queueConnection.close();} catch (Throwable ignored){}
+	   try {topicConnection.close();} catch (Throwable ignored){}
+   }
 
 
    // Emptys out all the messages in a queue




More information about the jboss-cvs-commits mailing list