You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2016/08/10 15:10:22 UTC

[jira] [Updated] (QPID-5010) ACL self tests written in python handle self.fail incorrectly

     [ https://issues.apache.org/jira/browse/QPID-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Ross updated QPID-5010:
------------------------------
    Component/s:     (was: Python Test Suite)
                 C++ Client
                 C++ Broker

> 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: C++ Broker, C++ Client
>    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 was sent by Atlassian JIRA
(v6.3.4#6332)

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