brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Changes propagator getDestination...
Date Fri, 11 Sep 2015 16:42:52 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: core/src/test/java/org/apache/brooklyn/enricher/stock/
    @@ -215,4 +213,43 @@ public void testEnricherSpecThrowsOnPropagatesAndPropagatesAllSet()
throws Excep
                 if (ise == null) throw e;
    +    @Test
    +    public void testPropagateToDynamicSensor() {
    --- End diff --
    Would be good to have a specific test for the actual fix, rather than just this more complicated
example. Maybe something like:
        public void testSensorPropagatedWhenMappingUsedSameNameButDifferentType() throws Exception
            AttributeSensor<String> origSensor = Sensors.newSensor(String.class, "origSensor");
            AttributeSensor<Object> sourceSensorFromYaml = Sensors.newSensor(Object.class,
            AttributeSensor<Object> targetSensor = Sensors.newSensor(Object.class, "newSensor");
                    .propagating(ImmutableMap.of(sourceSensorFromYaml, targetSensor))
            entity.sensors().set(origSensor, "myval");
            EntityTestUtils.assertAttributeEqualsEventually(app, targetSensor, "myval");

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

View raw message