fix for intermittent failure of org.apache.activegroups.GroupStateTest.testExpire test

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@803465 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2009-08-12 12:03:17 +00:00
parent bc72c54a65
commit d183e3a7c1
1 changed files with 2 additions and 2 deletions

View File

@ -1340,8 +1340,8 @@ public class Group<K, V> implements Map<K, V>, Service {
void checkMembership() {
if (this.started.get() && this.electionFinished.get()) {
long checkTime = System.currentTimeMillis() - getHeartBeatInterval();
boolean doElection = false;
long checkTime = System.currentTimeMillis() - (2 * getHeartBeatInterval()); // give it a bit more time since scheduler can be late
boolean doElection = false;
for (Member member : this.members.values()) {
if (member.getTimeStamp() < checkTime) {
LOG.info("Member timestamp expired " + member);