[jboss-cvs] joramtests/src/main/java/org/objectweb/jtests/jms/conform/connection ...

Clebert Suconic csuconic at jboss.com
Fri Jun 15 16:55:20 EDT 2007


  User: csuconic
  Date: 07/06/15 16:55:20

  Modified:    src/main/java/org/objectweb/jtests/jms/conform/connection 
                        ConnectionTest.java
  Log:
  Changing the test as specified in this user forum:
  http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054893#4054893
  
  Revision  Changes    Path
  1.2       +10 -6     joramtests/src/main/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConnectionTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/joramtests/src/main/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- ConnectionTest.java	29 Mar 2007 04:28:34 -0000	1.1
  +++ ConnectionTest.java	15 Jun 2007 20:55:20 -0000	1.2
  @@ -39,10 +39,10 @@
   /**
    * Test connections.
    * 
  - * See JMS specifications, §4.3.5 Closing a Connection
  + * See JMS specifications, �4.3.5 Closing a Connection
    *
    * @author Jeff Mesnil (jmesnil at inrialpes.fr)
  - * @version $Id: ConnectionTest.java,v 1.1 2007/03/29 04:28:34 starksm Exp $
  + * @version $Id: ConnectionTest.java,v 1.2 2007/06/15 20:55:20 csuconic Exp $
    */
   public class ConnectionTest extends PTPTestCase
   {
  @@ -57,6 +57,10 @@
         {
            receiverConnection.stop();
            receiverSession = receiverConnection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
  +         receiver.close(); // Before assigning a new receiver, we need to close the old one...
  +                           // Not closing it could cause load balancing between receivers.
  +                           // Not having this close might be valid for JORAM or JBossMQ, but it's not valid for JBossMessaging (and still legal)
  +
            receiver = receiverSession.createReceiver(receiverQueue);
            receiverConnection.start();
   
  @@ -66,7 +70,7 @@
            Message m = receiver.receive(TestConfig.TIMEOUT);
            receiverConnection.close();
            m.acknowledge();
  -         fail("§4.3.5 Invoking the acknowledge method of a received message from a closed "
  +         fail("�4.3.5 Invoking the acknowledge method of a received message from a closed "
                  + "connection's session must throw a [javax.jms.]IllegalStateException.\n");
         }
         catch (javax.jms.IllegalStateException e)
  @@ -74,12 +78,12 @@
         }
         catch (JMSException e)
         {
  -         fail("§4.3.5 Invoking the acknowledge method of a received message from a closed "
  +         fail("�4.3.5 Invoking the acknowledge method of a received message from a closed "
                  + "connection's session must throw a [javax.jms.]IllegalStateException, not a " + e);
         }
         catch (java.lang.IllegalStateException e)
         {
  -         fail("§4.3.5 Invoking the acknowledge method of a received message from a closed "
  +         fail("�4.3.5 Invoking the acknowledge method of a received message from a closed "
                  + "connection's session must throw an [javax.jms.]IllegalStateException "
                  + "[not a java.lang.IllegalStateException]");
         }
  @@ -145,7 +149,7 @@
         }
         catch (Exception e)
         {
  -         fail("§4.3.5 Closing a closed connection must not throw an exception.\n");
  +         fail("�4.3.5 Closing a closed connection must not throw an exception.\n");
         }
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list