summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java6
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java48
2 files changed, 2 insertions, 52 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java b/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
index 81735aa455..88100dc25f 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
@@ -151,10 +151,8 @@ public class PrincipalPermissionsTest extends TestCase
{
Object[] authArgs = new Object[]{_queue};
Object[] grantArgs = new Object[]{_queueName, _ownQueue};
-
- /* FIXME: This throws a null pointer exception QPID-1599
- * assertFalse(_perms.authorise(Permission.CONSUME, authArgs));
- */
+
+ assertEquals(AuthzResult.DENIED,_perms.authorise(Permission.CONSUME, authArgs));
_perms.grant(Permission.CONSUME, grantArgs);
assertEquals(AuthzResult.ALLOWED, _perms.authorise(Permission.CONSUME, authArgs));
}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java b/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
index b3a4196018..dde235f73e 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
@@ -193,54 +193,6 @@ public class SimpleACLTest extends QpidTestCase implements ConnectionListener
}
}
- public void testGuestConsumeWithCreateRightsAndWithoutConsumeRights() throws NamingException, ConfigurationException, IOException, Exception
- {
- //Customise the ACL config to give the guest user some create (could be any, non-consume) rights to
- //force creation of a PrincipalPermissions instance to perform the consume rights check against.
- setConfigurationProperty("virtualhosts.virtualhost.test.security.access_control_list.create.queues.queue.users.user", "guest");
-
- setUpACLTest();
-
- //QPID-2081: use a latch to sync on exception causing connection close, to work
- //around the connection close race during tearDown() causing sporadic failures
- final CountDownLatch exceptionReceived = new CountDownLatch(1);
-
- try
- {
- Connection conn = getConnection("guest", "guest");
-
- conn.setExceptionListener(new ExceptionListener()
- {
- public void onException(JMSException e)
- {
- exceptionReceived.countDown();
- }
- });
-
-
- Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- conn.start();
-
- sesh.createConsumer(sesh.createQueue("example.RequestQueue"));
-
- conn.close();
- }
- catch (JMSException e)
- {
- Throwable cause = e.getLinkedException();
-
- assertNotNull("There was no liked exception", cause);
- assertEquals("Wrong linked exception type", AMQAuthenticationException.class, cause.getClass());
- assertEquals("Incorrect error code received", 403, ((AMQAuthenticationException) cause).getErrorCode().getCode());
-
- //use the latch to ensure the control thread waits long enough for the exception thread
- //to have done enough to mark the connection closed before teardown commences
- assertTrue("Timed out waiting for conneciton to report close",
- exceptionReceived.await(2, TimeUnit.SECONDS));
- }
- }
-
public void testClientConsumeFromTempQueueValid() throws AMQException, URLSyntaxException, Exception
{
setUpACLTest();