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:48 UTC
[6/8] qpid-jms git commit: add test which highlights sending of
disposition frames after we end the session
add test which highlights sending of disposition 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/f2c7a7a3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/f2c7a7a3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/f2c7a7a3
Branch: refs/heads/master
Commit: f2c7a7a31d968366548427df0454d11cf3ab82ed
Parents: 8add0dc
Author: Robert Gemmell <ro...@apache.org>
Authored: Fri Mar 6 16:21:04 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Mar 6 16:25:13 2015 +0000
----------------------------------------------------------------------
.../jms/integration/SessionIntegrationTest.java | 31 ++++++++++++++++++++
1 file changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/f2c7a7a3/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 1ea2493..adf62e7 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
@@ -1278,4 +1278,35 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
session.close();
}
}
+
+ @Ignore // TODO: fails due to PROTON-833. Needs workaround or 0.9 to resolve.
+ @Test(timeout = 5000)
+ public void testCloseSessionWithConsumerThatRemoteDetachesWithUnackedMessages() throws Exception {
+ try (TestAmqpPeer testPeer = new TestAmqpPeer();) {
+ Connection connection = testFixture.establishConnecton(testPeer);
+ connection.start();
+
+ testPeer.expectBegin(true);
+
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ // Create a consumer, don't give it any messages
+ testPeer.expectReceiverAttach();
+ testPeer.expectLinkFlow();
+
+ Queue queue = session.createQueue("myQueue");
+ session.createConsumer(queue);
+
+ //Expect the session close
+ testPeer.expectEnd(false);
+ testPeer.sendTransferToLastOpenedLinkOnLastOpenedSession(false);
+ testPeer.remotelyDetachLastOpenedLinkOnLastOpenedSession(false, true);
+ testPeer.remotelyEndLastOpenedSession(false, 200);
+
+ session.close();
+
+ testPeer.expectClose();
+ connection.close();
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org