brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: SimpleCommand addition to brookly...
Date Mon, 23 Nov 2015 16:59:54 GMT
Github user geomacy commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1030#issuecomment-158995925
  
    I had a look today at using the new general purpose TestFrameworkAssertions as per Alex’s
comment [above](https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r45317688).
    
    One issue with that is that the general purpose code doesn’t give the same level of
detail in the error message if the assertions fail.   For instance with a test with several
failing assertions:
    ```
        - type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
          targetId: testprocess5
          command: hostname
          assertStatus:
            - equals: 1
          assertOut: 
            - equals: bogus
            - contains: porkpie
          assertErr: 
            - equals: explosion
    ```
    The general purpose class gives the following: 
    ```
    Failure running task invoking start[locations] on 1 node (JnQQSTYi): org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at TestCaseImpl{id=UwYqp5yt}:
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: java.lang.AssertionError:
expected [true] but found [false]
    ```
    While the current code gives
    ```
    Failure running task start (Lbltxgqq): java.lang.AssertionError: Assertion Failures: exit
code equals 1 stdout equals bogus stdout contains porkpie stderr equals explosion
    ```
    It may be valuable to extend the general purpose code to give more detail but I think
that’s a separate issue from 1030.  I think the other comments are all done, so I would
like to propose leaving the assertion handling as it is for the moment, in which case I hope
this PR could be merged?
    
    Let me know what you think,
    
    regards
    Geoff


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message