This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git


The following commit(s) were added to refs/heads/master by this push:
     new cbd6834  fix a non-det failing test
cbd6834 is described below

commit cbd683428604343791be55c4b851c89c6f298764
Author: Alex Heneveld <[email protected]>
AuthorDate: Wed Apr 1 22:58:07 2020 +0100

    fix a non-det failing test
---
 .../org/apache/brooklyn/entity/group/SequenceGroupTest.java  | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/core/src/test/java/org/apache/brooklyn/entity/group/SequenceGroupTest.java 
b/core/src/test/java/org/apache/brooklyn/entity/group/SequenceGroupTest.java
index f1d85c5..b096eb1 100644
--- a/core/src/test/java/org/apache/brooklyn/entity/group/SequenceGroupTest.java
+++ b/core/src/test/java/org/apache/brooklyn/entity/group/SequenceGroupTest.java
@@ -21,8 +21,9 @@ package org.apache.brooklyn.entity.group;
 import static org.apache.brooklyn.core.entity.EntityAsserts.assertAttribute;
 import static 
org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEquals;
 import static 
org.apache.brooklyn.core.entity.EntityAsserts.assertAttributeEqualsEventually;
+import static org.apache.brooklyn.test.Asserts.assertEquals;
 import static org.apache.brooklyn.test.Asserts.assertEqualsIgnoringOrder;
-import static org.apache.brooklyn.test.Asserts.*;
+import static org.apache.brooklyn.test.Asserts.assertTrue;
 import static org.apache.brooklyn.test.Asserts.succeedsEventually;
 
 import java.util.concurrent.atomic.AtomicInteger;
@@ -135,17 +136,18 @@ public class SequenceGroupTest extends 
BrooklynAppUnitTestSupport {
     public void testGroupWithMatchingFilterReturnsEverythingThatMatches() 
throws Exception {
         group = app.addChild(EntitySpec.create(SequenceGroup.class)
                 .configure(SequenceGroup.ENTITY_FILTER, 
Predicates.alwaysTrue()));
+        assertAttributeEqualsEventually(app, SequenceGroup.SEQUENCE_VALUE, 1);
+        assertAttributeEqualsEventually(group, SequenceGroup.SEQUENCE_VALUE, 
2);
+        
         createTestEntities();
         app.start(ImmutableList.of(loc1));
 
         assertAttributeEqualsEventually(group, SequenceGroup.RUNNING, true);
-
+        assertAttributeEqualsEventually(e3, SequenceGroup.SEQUENCE_VALUE, 5);
+        
         assertEqualsIgnoringOrder(group.getMembers(), ImmutableSet.of(e1, e2, 
e3, app, group));
-        assertAttributeEquals(app, SequenceGroup.SEQUENCE_VALUE, 1);
-        assertAttributeEquals(group, SequenceGroup.SEQUENCE_VALUE, 2);
         assertAttributeEquals(e1, SequenceGroup.SEQUENCE_VALUE, 3);
         assertAttributeEquals(e2, SequenceGroup.SEQUENCE_VALUE, 4);
-        assertAttributeEquals(e3, SequenceGroup.SEQUENCE_VALUE, 5);
         assertAttributeEquals(group, SequenceGroup.SEQUENCE_CURRENT, e3);
         AtomicInteger state = 
group.sensors().get(SequenceGroup.SEQUENCE_STATE);
         assertEquals(state.get(), 6);

Reply via email to