Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/915
Retest this please
Test failure is unrelated:
`ElectPrimaryTest.testSelectionModeFailoverReelectWithPreference`. The info log
from jenkins has the lines shown below. This tells us that
`ElectPrimaryEffector` is being called twice - once directly int the test, and
presumably concurrently by the policy's `onEvent` (it triggers that whenever a
child/member is added/removed or its serviceUp/serviceState/weighting sensor
changes). There is a definite race there, which can happen when the effector is
being called manually.
```
2017-12-11 17:28:13,488 INFO Test created app, and will now start
BasicApplicationImpl{id=jt5d932r4f}
2017-12-11 17:28:13,515 INFO Detected new primary
TestEntityImpl{id=jt0dh78cvw} at BasicApplicationImpl{id=jt5d932r4f}
(previously had null)
2017-12-11 17:28:13,515 INFO Primary TestEntityImpl{id=jt0dh78cvw} at
BasicApplicationImpl{id=jt5d932r4f} detected as healthy
2017-12-11 17:28:13,528 INFO Started application
BasicApplicationImpl{id=jt5d932r4f}
2017-12-11 17:28:13,530 INFO Detected new primary
TestEntityImpl{id=ndkegu8wyc} at BasicApplicationImpl{id=jt5d932r4f}
(previously had TestEntityImpl{id=jt0dh78cvw})
2017-12-11 17:28:13,531 INFO Detected new primary
TestEntityImpl{id=jt0dh78cvw} at BasicApplicationImpl{id=jt5d932r4f}
(previously had TestEntityImpl{id=ndkegu8wyc})
2017-12-11 17:28:43,544 INFO failed succeeds-eventually, 75 attempts,
30000ms elapsed (rethrowing): java.lang.AssertionError: attribute=Sensor:
primary (org.apache.brooklyn.api.entity.Entity);
val=TestEntityImpl{id=jt0dh78cvw}
```
---