Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/999#discussion_r44514528
  
    --- Diff: 
usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/BaseTest.java
 ---
    @@ -0,0 +1,34 @@
    +package org.apache.brooklyn.test.framework;
    +
    +import org.apache.brooklyn.api.entity.Entity;
    +import org.apache.brooklyn.config.ConfigKey;
    +import org.apache.brooklyn.core.config.ConfigKeys;
    +import org.apache.brooklyn.core.entity.trait.Startable;
    +import org.apache.brooklyn.util.core.flags.SetFromFlag;
    +
    +/**
    + *  A base interface for all tests.
    + */
    +public interface BaseTest extends Entity, Startable {
    +
    +    /**
    +     * The target entity to test (optional, use either this or targetId).
    +     */
    +    @SetFromFlag(nullable = false)
    --- End diff --
    
    feels like it would make more sense for this to take an `EntitySpec` (cf 
`DynamicCluster.memberSpec` -- and let's also find a way to remove the 
`$brooklyn:entitySpec` requirement), and if supplied, for it to be started 
*before* the defined `brooklyn.children`.
    
    btw at present this can only be used as a more long-winded way of 
`targetId` right?
    
    and we could make it polymorphic; i.e. if it's a string then it's taken as 
an entity ID, if it's an `EntitySpec` or a `Map` it is taken as a spec, and if 
it's an Entity (using `$brooklyn:component`) we take it as an entity.  then no 
need for `targetId`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to