You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/03/06 17:35:45 UTC
[3/8] qpid-jms git commit: add test which highlights sending of
detach frames after we end the session
add test which highlights sending of detach frames after we end the session
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/d509154c
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/d509154c
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/d509154c
Branch: refs/heads/master
Commit: d509154c7ad9df4fbe9ff87ff8cbc26cd58e1a6d
Parents: a7c2a9b
Author: Robert Gemmell <ro...@apache.org>
Authored: Fri Mar 6 12:17:58 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Mar 6 12:44:58 2015 +0000
----------------------------------------------------------------------
.../jms/integration/SessionIntegrationTest.java | 28 ++++++++++++++++++++
1 file changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/d509154c/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
index e7cbaea..1ea2493 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SessionIntegrationTest.java
@@ -76,6 +76,7 @@ import org.apache.qpid.jms.test.testpeer.matchers.sections.MessageHeaderSectionM
import org.apache.qpid.jms.test.testpeer.matchers.sections.TransferPayloadCompositeMatcher;
import org.apache.qpid.jms.test.testpeer.matchers.types.EncodedAmqpValueMatcher;
import org.apache.qpid.proton.amqp.Binary;
+import org.apache.qpid.proton.amqp.DescribedType;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.UnsignedInteger;
import org.junit.Ignore;
@@ -1250,4 +1251,31 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
consumer.close();
}
}
+
+ @Ignore // TODO: fails due to PROTON-833. Needs workaround or 0.9 to resolve.
+ @Test(timeout = 5000)
+ public void testCloseSessionWithConsumerThatRemoteDetaches() throws Exception {
+ try (TestAmqpPeer testPeer = new TestAmqpPeer();) {
+ Connection connection = testFixture.establishConnecton(testPeer);
+
+ testPeer.expectBegin(true);
+ Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+
+ // Create a consumer
+ testPeer.expectReceiverAttach();
+ testPeer.expectLinkFlow();
+
+ // Then locally close the session, provoke a remote-detach when the end reaches the
+ // test peer, followed by the session end 'response'. The test peer should not
+ // expect a reply to the detach, as the session was already ended at the client.
+ testPeer.expectEnd(false);
+ testPeer.remotelyDetachLastOpenedLinkOnLastOpenedSession(false, true);
+ testPeer.remotelyEndLastOpenedSession(false);
+
+ Queue queue = session.createQueue("myQueue");
+ session.createConsumer(queue);
+
+ session.close();
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org