qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [1/2] qpid-jms git commit: Test a couple more passthrough cases.
Date Tue, 10 Feb 2015 23:44:06 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 6136f9836 -> 1cc00eef8


Test a couple more passthrough cases.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/a8cc969f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/a8cc969f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/a8cc969f

Branch: refs/heads/master
Commit: a8cc969fc0347fb1fdc84d1f1e4dea045132e3a7
Parents: 6136f98
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue Feb 10 18:37:55 2015 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue Feb 10 18:37:55 2015 -0500

----------------------------------------------------------------------
 .../provider/failover/FailoverProviderTest.java | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a8cc969f/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
index f77d4eb..40b4f22 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderTest.java
@@ -295,4 +295,32 @@ public class FailoverProviderTest extends FailoverProviderTestSupport
{
         assertEquals(1, MockProviderContext.INSTANCE.getContextStats().getCreateResourceCalls(JmsProducerInfo.class));
         assertEquals(1, MockProviderContext.INSTANCE.getContextStats().getDestroyResourceCalls(JmsProducerInfo.class));
     }
+
+    @Test(timeout = 30000)
+    public void testSessionRecoverPassthrough() throws Exception {
+        JmsConnectionFactory factory = new JmsConnectionFactory(
+            "failover:(mock://localhost)");
+
+        Connection connection = factory.createConnection();
+        connection.start();
+        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+        session.recover();
+        connection.close();
+
+        assertEquals(1, MockProviderContext.INSTANCE.getContextStats().getRecoverCalls());
+    }
+
+    @Test(timeout = 30000)
+    public void testSessionUnsubscribePassthrough() throws Exception {
+        JmsConnectionFactory factory = new JmsConnectionFactory(
+            "failover:(mock://localhost)");
+
+        Connection connection = factory.createConnection();
+        connection.start();
+        Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+        session.unsubscribe("some-subscription");
+        connection.close();
+
+        assertEquals(1, MockProviderContext.INSTANCE.getContextStats().getUnsubscribeCalls());
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message