qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [6/8] qpid-jms git commit: add test which highlights sending of disposition frames after we end the session
Date Fri, 06 Mar 2015 16:35:48 GMT
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 <robbie@apache.org>
Authored: Fri Mar 6 16:21:04 2015 +0000
Committer: Robert Gemmell <robbie@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


Mime
View raw message