[jboss-cvs] JBoss Messaging SVN: r7242 - trunk/tests/jms-tests/src/org/jboss/test/messaging/jms.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 8 05:56:45 EDT 2009


Author: timfox
Date: 2009-06-08 05:56:44 -0400 (Mon, 08 Jun 2009)
New Revision: 7242

Modified:
   trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/ConnectionTest.java
Log:
reduce test iterations for now

Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/ConnectionTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/ConnectionTest.java	2009-06-08 09:16:29 UTC (rev 7241)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/ConnectionTest.java	2009-06-08 09:56:44 UTC (rev 7242)
@@ -37,7 +37,6 @@
 
 import org.jboss.messaging.core.logging.Logger;
 
-
 /**
  * Connection tests. Contains all connection tests, except tests relating to closing a connection,
  * which go to ConnectionClosedTest.
@@ -69,10 +68,9 @@
       for (int i = 0; i < 100; i++)
       {
          Connection conn = cf.createConnection();
-         conn.close();        
+         conn.close();
       }
-   }     
-   
+   }
 
    //
    // Note: All tests related to closing a Connection should go to ConnectionClosedTest
@@ -83,9 +81,9 @@
       Connection connection = cf.createConnection();
       String clientID = connection.getClientID();
 
-      //We don't currently set client ids on the server, so this should be null.
-      //In the future we may provide conection factories that set a specific client id
-      //so this may change
+      // We don't currently set client ids on the server, so this should be null.
+      // In the future we may provide conection factories that set a specific client id
+      // so this may change
       assertNull(clientID);
 
       connection.close();
@@ -106,12 +104,12 @@
 
    public void testSetClientAfterStart() throws Exception
    {
-   	Connection connection = null;
+      Connection connection = null;
       try
       {
          connection = cf.createConnection();
 
-         //we startthe connection
+         // we startthe connection
          connection.start();
 
          // an attempt to set the client ID now should throw a IllegalStateException
@@ -131,20 +129,20 @@
       }
       finally
       {
-      	if (connection != null)
-      	{
-      		connection.close();
-      	}
+         if (connection != null)
+         {
+            connection.close();
+         }
       }
-      
+
    }
 
    public void testSetClientIDFail() throws Exception
    {
       final String clientID = "my-test-client-id";
 
-      //Setting a client id must be the first thing done to the connection
-      //otherwise a javax.jms.IllegalStateException must be thrown
+      // Setting a client id must be the first thing done to the connection
+      // otherwise a javax.jms.IllegalStateException must be thrown
 
       Connection connection = cf.createConnection();
       connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -160,7 +158,6 @@
 
       connection.close();
 
-
       connection = cf.createConnection();
       connection.getClientID();
       try
@@ -204,7 +201,7 @@
 
       ConnectionMetaData metaData = (ConnectionMetaData)connection.getMetaData();
 
-      //TODO - need to check whether these are same as current version
+      // TODO - need to check whether these are same as current version
       metaData.getJMSMajorVersion();
       metaData.getJMSMinorVersion();
       metaData.getJMSProviderName();
@@ -213,11 +210,10 @@
       metaData.getProviderMajorVersion();
       metaData.getProviderMinorVersion();
       metaData.getProviderVersion();
-      
+
       connection.close();
    }
 
-
    /**
     * Test creation of QueueSession
     */
@@ -267,23 +263,21 @@
       conn.close();
 
    }
-   
-   // This test is to check netty issue in https://jira.jboss.org/jira/browse/JBMESSAGING-1618   
-   
+
+   // This test is to check netty issue in https://jira.jboss.org/jira/browse/JBMESSAGING-1618
+
    public void testConnectionListenerBug() throws Exception
    {
-      for (int i = 0; i < 10000; i++)
+      for (int i = 0; i < 1000; i++)
       {
-         //log.info("******************************************** it " + i);
-         
          Connection conn = cf.createConnection();
-         
+
          MyExceptionListener listener = new MyExceptionListener();
-         
+
          conn.setExceptionListener(listener);
-         
-         conn.close();                 
-      } 
+
+         conn.close();
+      }
    }
 
    /**
@@ -298,8 +292,11 @@
 
       try
       {
-         queueConnection.createDurableConnectionConsumer((Topic)topic1, "subscriptionName", "",
-            (ServerSessionPool) null, 1);
+         queueConnection.createDurableConnectionConsumer((Topic)topic1,
+                                                         "subscriptionName",
+                                                         "",
+                                                         (ServerSessionPool)null,
+                                                         1);
          fail("Should throw a javax.jms.IllegalStateException");
       }
       catch (javax.jms.IllegalStateException e)
@@ -307,7 +304,7 @@
       }
       catch (java.lang.IllegalStateException e)
       {
-         fail ("Should throw a javax.jms.IllegalStateException");
+         fail("Should throw a javax.jms.IllegalStateException");
       }
       catch (JMSException e)
       {
@@ -317,7 +314,7 @@
       {
          queueConnection.close();
       }
-   }     
+   }
 
    // Package protected ---------------------------------------------
 




More information about the jboss-cvs-commits mailing list