Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/61#discussion_r14806268
--- Diff: core/src/test/java/brooklyn/entity/group/DynamicClusterTest.java
---
@@ -514,10 +514,18 @@ public void
defaultRemovalStrategyShutsDownNewestFirstWhenResizing() throws Exce
assertEquals(cluster.getCurrentSize(), (Integer)2);
assertEquals(ImmutableSet.copyOf(cluster.getMembers()),
ImmutableSet.copyOf(creationOrder), "actual="+cluster.getMembers());
+ Collection<Entity> preStopMembers =
ImmutableList.copyOf(cluster.getMembers());
+
// Now stop one
cluster.resize(1);
assertEquals(cluster.getCurrentSize(), (Integer)1);
- assertEquals(ImmutableList.copyOf(cluster.getMembers()),
creationOrder.subList(0, 1));
+
+ //Make sure we stopped the entity with the earliest creation time
--- End diff --
we stop the entity with the **latest** creation time, not the **earliest**
(the code is correct, but the comment is not)
---
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.
---