brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Adds pre and post launch command ...
Date Wed, 09 Jul 2014 10:29:46 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/42#discussion_r14702837
  
    --- Diff: software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessSshDriverIntegrationTest.java
---
    @@ -204,6 +205,24 @@ public void testCopyResourceCreatingParentDir() throws Exception
{
             }
         }
     
    +    @Test(groups="Integration")
    +    public void testPreAndPostLaunchCommands() throws IOException {
    --- End diff --
    
    This will do for now, but it doesn't assert that things were executed at the right time.
    
    I'd probably have used a VanillaSoftwareProcess that has a `LAUNCH_COMMAND` of `echo inLaunch
>> "+tempFile.getAbsoluteFile()`. I'd have pre launch doing ``echo inPreLaunch >>
"+tempFile.getAbsoluteFile()` etc. My assertion would then be that the file contained the
lines (in order) of inPreLaunch, inLaunch, inPostLaunch.
    
    Note I'm a big fan of really boring names like "inPreLaunch" rather than "foo" as it's
really easy for someone looking at the code + results to see what is happening. My tests use
things like "myPassword" - if this value ends up in the wrong place, it's easy to see what
happened.


---
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