brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Finer-grained STOP effector param...
Date Wed, 07 Jan 2015 11:01:56 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/422#discussion_r22580886
  
    --- Diff: software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java
---
    @@ -267,6 +275,87 @@ public void testBasicSoftwareProcessStopsProcess() throws Exception
{
         }
         
         @Test
    +    public void testBasicSoftwareProcessCanStop() {
    +        Object[] matrix = new Object[] {
    +                StopMode.ALWAYS, true, true,
    +                StopMode.ALWAYS, false, true,
    +                StopMode.IF_NOT_STOPPED, true, false,
    +                StopMode.IF_NOT_STOPPED, false, true,
    +                StopMode.NEVER, true, false,
    +                StopMode.NEVER, false, false
    +        };
    +        for (int i = 0; i < matrix.length; i+=3) {
    +            StopMode mode = (StopMode)matrix[i];
    +            boolean isEntityStopped = (Boolean)matrix[i+1];
    +            boolean expected = (Boolean)matrix[i+2];
    +            boolean canStop = MachineLifecycleEffectorTasks.canStop(mode, isEntityStopped);
    +            assertEquals(canStop, expected);
    --- End diff --
    
    Thanks for the data providers pointer, changed the code to use them. Logs the failing
mode parameters automatically.


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