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

    https://github.com/apache/incubator-brooklyn/pull/1174#discussion_r50965854
  
    --- Diff: 
brooklyn-server/core/src/test/java/org/apache/brooklyn/core/config/ConfigKeyConstraintTest.java
 ---
    @@ -297,12 +299,17 @@ public void 
testContextAwarePredicateInformedOfEntity() {
         public void testQuickFutureResolved() {
             // Result of task is -1, outside of the range specified by the 
config key.
             try {
    -            
app.createAndManageChild(EntitySpec.create(EntityRequiringConfigKeyInRange.class)
    +            EntityRequiringConfigKeyInRange child = 
app.createAndManageChild(EntitySpec.create(EntityRequiringConfigKeyInRange.class)
                         .configure(EntityRequiringConfigKeyInRange.RANGE, 
sleepingTask(Duration.ZERO, -1)));
    -            fail("Expected exception when managing entity with incorrect 
config");
    +            // may or may not fail above, depending on speed, but should 
fail if assert after forcing resolution
    +            Object value = 
child.getConfig(EntityRequiringConfigKeyInRange.RANGE);
    +            // NB the call above does not currently/necessarily apply 
validation
    +            log.debug(JavaClassNames.niceClassAndMethod()+" got "+value+" 
for "+EntityRequiringConfigKeyInRange.RANGE+", now explicitly validating");
    +            ConfigConstraints.assertValid(child);
    +            fail("Expected exception when managing entity with incorrect 
config; instead passed assertion and got: "+value);
             } catch (Exception e) {
    -            Throwable t = Exceptions.getFirstThrowableOfType(e, 
ConstraintViolationException.class);
    -            assertNotNull(t, "Original exception was: " + 
Exceptions.collapseText(e));
    +            e.printStackTrace();
    --- End diff --
    
    ouch now good spot i'll remove this


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