activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1360088 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
Date Wed, 11 Jul 2012 09:45:32 GMT
Author: dejanb
Date: Wed Jul 11 09:45:32 2012
New Revision: 1360088

URL: http://svn.apache.org/viewvc?rev=1360088&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-2665 - refactoring the test a bit

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java?rev=1360088&r1=1360087&r2=1360088&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java
Wed Jul 11 09:45:32 2012
@@ -90,7 +90,7 @@ public class DurableSubscriptionActivati
         }
     }
 
-    public void testActivateWithExistingTopic1() throws Exception {
+    public void testActivateWithExistingTopic() throws Exception {
         // create durable subscription
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         session.createDurableSubscriber(topic, "SubsId");
@@ -101,36 +101,13 @@ public class DurableSubscriptionActivati
         // restart the broker
         restartBroker();
 
-        // activate
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        assertTrue("More than one consumer found: " + d.getConsumers().size(), d.getConsumers().size()
== 1);
-
-        // re-activate
-        connection.close();
-        connection = createConnection();
-        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
+        d = broker.getDestination(topic);
         assertTrue("More than one consumer found: " + d.getConsumers().size(), d.getConsumers().size()
== 1);
-    }
-
-    public void testActivateWithExistingTopic2() throws Exception {
-        // create durable subscription
-        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-        session.createDurableSubscriber(topic, "SubsId");
-
-        // restart the broker
-        restartBroker();
-
-        Destination d1 = broker.getDestination(topic);
 
         // activate
         session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         session.createDurableSubscriber(topic, "SubsId");
 
-        Destination d = broker.getDestination(topic);
         assertTrue("More than one consumer found: " + d.getConsumers().size(), d.getConsumers().size()
== 1);
 
         // re-activate



Mime
View raw message