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:16 UTC
[1/2] qpid-jms git commit: fix c&p error,
make sure temp topic tests use temp topics
Repository: qpid-jms
Updated Branches:
refs/heads/master 9df37599c -> f7a12648c
fix c&p error, make sure temp topic tests use temp topics
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/29706a8d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/29706a8d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/29706a8d
Branch: refs/heads/master
Commit: 29706a8dd4f23ddf543eec90c6816f33f44b4893
Parents: 9df3759
Author: Robert Gemmell <ro...@apache.org>
Authored: Tue Mar 10 10:22:05 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Tue Mar 10 10:33:08 2015 +0000
----------------------------------------------------------------------
.../apache/qpid/jms/integration/SessionIntegrationTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/29706a8d/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 6b8f6e3..b0ac37a 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
@@ -214,12 +214,12 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
@Test(timeout = 5000)
public void testCreateTemporaryTopicFailsWhenLinkRefusedAndAttachResponseWriteIsNotDeferred() throws Exception {
- doCreateTemporaryDestinationFailsWhenLinkRefusedTestImpl(false, false);
+ doCreateTemporaryDestinationFailsWhenLinkRefusedTestImpl(true, false);
}
@Test(timeout = 5000)
public void testCreateTemporaryTopicFailsWhenLinkRefusedAndAttachResponseWriteIsDeferred() throws Exception {
- doCreateTemporaryDestinationFailsWhenLinkRefusedTestImpl(false, true);
+ doCreateTemporaryDestinationFailsWhenLinkRefusedTestImpl(true, true);
}
private void doCreateTemporaryDestinationFailsWhenLinkRefusedTestImpl(boolean topic, boolean deferAttachResponseWrite) throws Exception {
@@ -231,12 +231,12 @@ public class SessionIntegrationTest extends QpidJmsTestCase {
testPeer.expectBegin(true);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- testPeer.expectAndRefuseTempQueueCreationAttach(AmqpError.UNAUTHORIZED_ACCESS, "Not Authorized to create temp queues.", false);
-
try {
if (topic) {
+ testPeer.expectAndRefuseTempTopicCreationAttach(AmqpError.UNAUTHORIZED_ACCESS, "Not Authorized to create temp topics.", false);
session.createTemporaryTopic();
} else {
+ testPeer.expectAndRefuseTempQueueCreationAttach(AmqpError.UNAUTHORIZED_ACCESS, "Not Authorized to create temp queues.", 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
[2/2] qpid-jms git commit: add handler for the detach response,
fix sporadic failure from race to close the test peer
Posted by ro...@apache.org.
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