activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r376765 - /incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
Date Fri, 10 Feb 2006 17:06:08 GMT
Author: chirino
Date: Fri Feb 10 09:06:07 2006
New Revision: 376765

URL: http://svn.apache.org/viewcvs?rev=376765&view=rev
Log:
cleaned up the test a little.

Modified:
    incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java

Modified: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java?rev=376765&r1=376764&r2=376765&view=diff
==============================================================================
--- incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
(original)
+++ incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
Fri Feb 10 09:06:07 2006
@@ -16,7 +16,6 @@
  */
 
 package org.apache.activemq.usecases;
-import java.util.HashMap;
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.IllegalStateException;
@@ -24,8 +23,6 @@
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
 import javax.jms.Session;
 
 import org.apache.activemq.test.TestSupport;
@@ -34,8 +31,6 @@
  * @version $Revision: 1.1.1.1 $
  */
 public class ChangeSessionDeliveryModeTest extends TestSupport implements MessageListener
{
-    private static final int COUNT = 200;
-    private static final String VALUE_NAME = "value";
 
     /**
      * test following condition- which are defined by JMS Spec 1.1: MessageConsumers cannot
use a MessageListener and
@@ -52,13 +47,14 @@
         consumer1.setMessageListener(this);
         JMSException jmsEx = null;
         MessageConsumer consumer2 = consumerSession.createConsumer(destination);
+        
         try {
             consumer2.receive(10);
+            fail("Did not receive expected exception.");
         }
         catch (JMSException e) {
-            jmsEx = e;
+            assertTrue(e instanceof IllegalStateException);
         }
-        assertTrue(jmsEx != null && jmsEx instanceof IllegalStateException);
     }
 
     public void onMessage(Message msg) {



Mime
View raw message