diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-08-18 16:27:57 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-08-18 16:27:57 +0000 |
commit | 180da1951d21bab0cd8ae892c7a86838a1e45711 (patch) | |
tree | 31e779b125d2f974ad8e5b28e07374e1d2f3a66f | |
parent | 44da73542614f9a853ff1e57efc8be9e2558761d (diff) | |
download | qpid-python-180da1951d21bab0cd8ae892c7a86838a1e45711.tar.gz |
QPID-1252: modified tests to unsubscribe the durable subscriptions they create
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@686811 13f79535-47bb-0310-9956-ffa450edef68
3 files changed, 11 insertions, 0 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSessionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSessionTest.java index 417b9b75f0..7c0147b786 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSessionTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSessionTest.java @@ -79,6 +79,8 @@ public class AMQSessionTest extends QpidTestCase subscriber = _session.createDurableSubscriber(_topic, "mysubname2", "abc", false); assertEquals("Topic names should match from durable TopicSubscriber with selector", _topic.getTopicName(), subscriber.getTopic().getTopicName()); + _session.unsubscribe("mysubname"); + _session.unsubscribe("mysubname2"); } public void testCreateQueueReceiver() throws JMSException diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java index 2d3a98977f..fe7b97a47d 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/DurableSubscriptionTest.java @@ -188,6 +188,8 @@ public class DurableSubscriptionTest extends QpidTestCase consumer1.close(); consumer3.close(); + session3.unsubscribe("MySubscription"); + con.close(); } @@ -266,6 +268,8 @@ public class DurableSubscriptionTest extends QpidTestCase consumer1.close(); consumer3.close(); + session3.unsubscribe("MySubscription"); + con0.close(); con1.close(); con3.close(); @@ -305,6 +309,7 @@ public class DurableSubscriptionTest extends QpidTestCase assertNotNull ("Message should have been received", msg); assertEquals ("testDurableWithInvalidSelector2", ((TextMessage) msg).getText()); assertNull("Should not receive subsequent message", liveSubscriber.receive(200)); + session.unsubscribe("testDurableWithInvalidSelectorSub"); } /*** @@ -339,6 +344,8 @@ public class DurableSubscriptionTest extends QpidTestCase assertNotNull ("Message should have been received", msg); assertEquals ("testDurableWithInvalidSelector2", ((TextMessage) msg).getText()); assertNull("Should not receive subsequent message", liveSubscriber.receive(200)); + + session.unsubscribe("testDurableWithInvalidDestinationsub"); } public static junit.framework.Test suite() diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java index 7a20b1058b..9f4c9e53aa 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java @@ -134,6 +134,7 @@ public class TopicSessionTest extends QpidTestCase m = (TextMessage) sub2.receive(2000); assertNotNull(m); assertEquals("goodbye", m.getText()); + session1.unsubscribe("subscription0"); con.close(); } @@ -163,6 +164,7 @@ public class TopicSessionTest extends QpidTestCase tm = (TextMessage) sub.receive(2000); assertNotNull(tm); assertEquals("Hello2", tm.getText()); + session2.unsubscribe("subscription0"); con1.close(); con2.close(); } |