Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/197#discussion_r18292743
--- Diff:
core/src/test/java/brooklyn/management/ha/HighAvailabilityManagerSplitBrainTest.java
---
@@ -263,15 +270,15 @@ public void testIfNodeStopsBeingAbleToWrite() throws
Exception {
// n2 now sees itself as master, with n1 in standby again
ManagementPlaneSyncRecord memento2c =
n2.ha.getManagementPlaneSyncState();
log.info(n2+" HA now: "+memento2c);
-
assertEquals(memento2c.getManagementNodes().get(n1.ownNodeId).getStatus(),
ManagementNodeState.STANDBY);
+
assertEquals(memento2c.getManagementNodes().get(n1.ownNodeId).getStatus(),
expectedStateAfterDemotion);
assertEquals(memento2c.getManagementNodes().get(n2.ownNodeId).getStatus(),
ManagementNodeState.MASTER);
assertEquals(memento2c.getMasterNodeId(), n2.ownNodeId);
assertEquals(memento2c.getManagementNodes().get(n1.ownNodeId).getRemoteTimestamp(),
time2);
assertEquals(memento2c.getManagementNodes().get(n2.ownNodeId).getRemoteTimestamp(),
time2);
- // and no entities at n1
- assertEquals(n1.mgmt.getApplications().size(), 0);
+ // right number of entities at n2; n1 may or may not depending
whether hot standby is default
assertEquals(n2.mgmt.getApplications().size(), 1);
+// assertEquals(n1.mgmt.getApplications().size(), 0);
--- End diff --
good idea
---
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.
---