Author: ritchiem
Date: Wed Oct 28 15:37:19 2009
New Revision: 830615

URL: http://svn.apache.org/viewvc?rev=830615&view=rev
Log:
QPID-1872: remove systest and reinstate equivalent unit test

Modified:
    
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
    
qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java

Modified: 
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java?rev=830615&r1=830614&r2=830615&view=diff
==============================================================================
--- 
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
 (original)
+++ 
qpid/branches/0.5.x-dev/qpid/java/broker/src/test/java/org/apache/qpid/server/security/access/PrincipalPermissionsTest.java
 Wed Oct 28 15:37:19 2009
@@ -151,10 +151,8 @@
     {
         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));
     }

Modified: 
qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java?rev=830615&r1=830614&r2=830615&view=diff
==============================================================================
--- 
qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
 (original)
+++ 
qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
 Wed Oct 28 15:37:19 2009
@@ -193,54 +193,6 @@
         }
     }
 
-    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();



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to