Chuck Rolke created QPID-5010:
---------------------------------

             Summary: ACL self tests written in python handle self.fail 
incorrectly
                 Key: QPID-5010
                 URL: https://issues.apache.org/jira/browse/QPID-5010
             Project: Qpid
          Issue Type: Bug
          Components: Python Test Suite
    Affects Versions: 0.14
         Environment: cmake 'make test', or ./cpp/src/tests/run_acl_tests
            Reporter: Chuck Rolke
            Assignee: Chuck Rolke


When a self.fail() function is called inside a try: block then control simply 
passes to the except: handler. The function does not exit with a failure.

In this example suppose that the get_connection() for evildude is expected to 
fail but it does not.

{noformat}
try:
    conne1 = self.get_connection('evildude','evildude')
    self.fail("Should not create a connection for user evildude")
except Exception, e:
    result = None
    self.fail("8888:" + str(e))
{noformat}

produces failure:

{noformat}
AssertionError: 8888:Should not create a connection for user evildude
{noformat}

Code in acl.py expected the function to exit with the signalled error. To 
properly fail the code must set a flag while in the try block and then test 
that flag to sequently fail outside of the try block.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to