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/10 12:36:17 UTC

[2/2] qpid-jms git commit: add handler for the detach response, fix sporadic failure from race to close the test peer

add handler for the detach response, fix sporadic failure from race to close the test peer


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/f7a12648
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/f7a12648
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/f7a12648

Branch: refs/heads/master
Commit: f7a12648ca40ed6d740b7e4669da959800271137
Parents: 29706a8
Author: Robert Gemmell <ro...@apache.org>
Authored: Tue Mar 10 10:34:53 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Tue Mar 10 10:34:53 2015 +0000

----------------------------------------------------------------------
 .../apache/qpid/jms/integration/SessionIntegrationTest.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/f7a12648/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 b0ac37a..89f6ef0 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
@@ -234,9 +234,15 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
             try {
                 if (topic) {
                     testPeer.expectAndRefuseTempTopicCreationAttach(AmqpError.UNAUTHORIZED_ACCESS, "Not Authorized to create temp topics.", false);
+                    //Expect the detach response to the test peer after refusal.
+                    testPeer.expectDetach(true, false, false);
+
                     session.createTemporaryTopic();
                 } else {
                     testPeer.expectAndRefuseTempQueueCreationAttach(AmqpError.UNAUTHORIZED_ACCESS, "Not Authorized to create temp queues.", false);
+                    //Expect the detach response to the test peer after refusal.
+                    testPeer.expectDetach(true, false, false);
+
                     session.createTemporaryQueue();
                 }
                 fail("Should have thrown security exception");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org