Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6FC617B9C for ; Fri, 6 Mar 2015 16:35:53 +0000 (UTC) Received: (qmail 89186 invoked by uid 500); 6 Mar 2015 16:35:44 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 89096 invoked by uid 500); 6 Mar 2015 16:35:44 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 88984 invoked by uid 99); 6 Mar 2015 16:35:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2015 16:35:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DFC6AE107F; Fri, 6 Mar 2015 16:35:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robbie@apache.org To: commits@qpid.apache.org Date: Fri, 06 Mar 2015 16:35:48 -0000 Message-Id: In-Reply-To: <80b6d76e51df4f50adf9189aae450fc4@git.apache.org> References: <80b6d76e51df4f50adf9189aae450fc4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Fri Mar 6 16:21:04 2015 +0000 Committer: Robert Gemmell 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