brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikezaccardo <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #403: Adds DynamicFabric.includeInitialChildren...
Date Mon, 07 Nov 2016 19:18:55 GMT
Github user mikezaccardo commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/403#discussion_r86846586
  
    --- Diff: core/src/test/java/org/apache/brooklyn/entity/group/DynamicRegionsFabricTest.java
---
    @@ -60,16 +64,98 @@ public void setUp() throws Exception {
         }
     
         @Test
    -    public void testUsesInitialLocations() throws Exception {
    +    public void testUsesInitialLocationsFromStartEffectorArgs() throws Exception {
             app.start(ImmutableList.of(loc1, loc2));
     
    -        assertEquals(fabric.getChildren().size(), 2, "children="+fabric.getChildren());
    -        assertEquals(fabric.getMembers().size(), 2, "members="+fabric.getMembers());
    -        assertEqualsIgnoringOrder(fabric.getChildren(), fabric.getMembers());
    -        assertEqualsIgnoringOrder(getLocationsOfChildren(fabric), ImmutableList.of(loc1,
loc2));
    +        assertFabricChildren(fabric, 2, ImmutableList.of(loc1, loc2));
    +    }
    +    
    +    @Test
    +    @SuppressWarnings("deprecation")
    +    public void testUsesInitialLocationsFromAppSpec() throws Exception {
    +        TestApplication app2 = mgmt.getEntityManager().createEntity(EntitySpec.create(TestApplication.class)
    +            .configure(BrooklynConfigKeys.SKIP_ON_BOX_BASE_DIR_RESOLUTION, true)
    +            .child(EntitySpec.create(DynamicRegionsFabric.class)
    +                .configure("memberSpec", EntitySpec.create(TestEntity.class)))
    +            .locations(ImmutableList.of(loc1, loc2)));
    +        DynamicRegionsFabric fabric2 = (DynamicRegionsFabric) Iterables.getOnlyElement(app2.getChildren());
    +        app2.start(ImmutableList.<Location>of());
    +        
    +        assertFabricChildren(fabric2, 2, ImmutableList.of(loc1, loc2));
         }
         
         @Test
    +    @SuppressWarnings("deprecation")
    +    public void testUsesInitialLocationsFromEntitySpec() throws Exception {
    --- End diff --
    
    This test is identical to `testUsesInitialLocationsFromAppSpec()`


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