You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/02/17 00:29:56 UTC
qpid-jms git commit: Test that sends passthrough failover logic when
connected.
Repository: qpid-jms
Updated Branches:
refs/heads/master 289c9ab3d -> e06bed598
Test that sends passthrough failover logic when connected.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/e06bed59
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/e06bed59
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/e06bed59
Branch: refs/heads/master
Commit: e06bed598657c5ce82041c36ca570c8b63570a06
Parents: 289c9ab
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Feb 16 18:29:48 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Feb 16 18:29:48 2015 -0500
----------------------------------------------------------------------
.../provider/failover/FailoverProviderTest.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e06bed59/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 1a04b32..0a57f59 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
@@ -36,6 +36,8 @@ import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
import javax.jms.Session;
import org.apache.qpid.jms.JmsConnectionFactory;
@@ -358,6 +360,23 @@ public class FailoverProviderTest extends FailoverProviderTestSupport {
assertEquals(1, mockPeer.getContextStats().getUnsubscribeCalls());
}
+ @Test(timeout = 30000)
+ public void testSendMessagePassthrough() throws Exception {
+ JmsConnectionFactory factory = new JmsConnectionFactory(
+ "failover:(mock://localhost)");
+
+ Connection connection = factory.createConnection();
+ connection.start();
+ Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+ Queue queue = session.createQueue(getTestName());
+ MessageProducer producer = session.createProducer(queue);
+ producer.send(session.createMessage());
+
+ connection.close();
+
+ assertEquals(1, mockPeer.getContextStats().getSendCalls());
+ }
+
@Test(timeout=10000)
public void testTimeoutsSetFromConnectionInfo() throws IOException, JMSException {
final long CONNECT_TIMEOUT = TimeUnit.SECONDS.toMillis(4);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org