diff options
| author | Robert Gemmell <robbie@apache.org> | 2009-10-21 11:39:05 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2009-10-21 11:39:05 +0000 |
| commit | 736c8f28c961d9c43fd95ef59445f4195b4d625c (patch) | |
| tree | 926e06b5fd8089da2467af6e6b25513e45dc24d5 /qpid/java | |
| parent | 8e3eaee0868182ccc79252ed8e914d76fdfe68bd (diff) | |
| download | qpid-python-736c8f28c961d9c43fd95ef59445f4195b4d625c.tar.gz | |
QPID-1872: remove systest and reinstate equivalent unit test
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@827968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
2 files changed, 2 insertions, 52 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java index 81735aa455..88100dc25f 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java +++ b/qpid/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/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java index b3a4196018..dde235f73e 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java +++ b/qpid/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(); |
