use of org.apache.geode.test.dunit.WaitCriterion in project geode by apache.
the class CqQueryTestListener method waitForDestroyed.
public boolean waitForDestroyed(final Object key) {
WaitCriterion ev = new WaitCriterion() {
public boolean done() {
return CqQueryTestListener.this.destroys.contains(key);
}
public String description() {
return "never got destroy event for key " + key + " in CQ " + CqQueryTestListener.this.cqName;
}
};
Wait.waitForCriterion(ev, MAX_TIME, 200, true);
return true;
}
use of org.apache.geode.test.dunit.WaitCriterion in project geode by apache.
the class CqQueryTestListener method waitForRegionInvalidate.
public boolean waitForRegionInvalidate() {
WaitCriterion ev = new WaitCriterion() {
public boolean done() {
return CqQueryTestListener.this.eventRegionInvalidate;
}
public String description() {
return "never got region invalidate event for CQ " + CqQueryTestListener.this.cqName;
}
};
Wait.waitForCriterion(ev, MAX_TIME, 200, true);
return true;
}
use of org.apache.geode.test.dunit.WaitCriterion in project geode by apache.
the class CqQueryTestListener method waitForCqsDisconnectedEvents.
public boolean waitForCqsDisconnectedEvents(final int total) {
WaitCriterion ev = new WaitCriterion() {
public boolean done() {
return (CqQueryTestListener.this.cqsDisconnectedCount == total);
}
public String description() {
return "Did not receive expected number of calls to cqsDisconnected() " + CqQueryTestListener.this.cqName + " expected: " + total + " received: " + CqQueryTestListener.this.cqsDisconnectedCount;
}
};
Wait.waitForCriterion(ev, MAX_TIME, 200, true);
return true;
}
use of org.apache.geode.test.dunit.WaitCriterion in project geode by apache.
the class CqQueryTestListener method waitForRegionClear.
public boolean waitForRegionClear() {
WaitCriterion ev = new WaitCriterion() {
public boolean done() {
return CqQueryTestListener.this.eventRegionClear;
}
public String description() {
return "never got region clear event for CQ " + CqQueryTestListener.this.cqName;
}
};
Wait.waitForCriterion(ev, MAX_TIME, 200, true);
return true;
}
use of org.apache.geode.test.dunit.WaitCriterion in project geode by apache.
the class CqQueryTestListener method waitForClose.
public boolean waitForClose() {
WaitCriterion ev = new WaitCriterion() {
public boolean done() {
return CqQueryTestListener.this.eventClose;
}
public String description() {
return "never got close event for CQ " + CqQueryTestListener.this.cqName;
}
};
Wait.waitForCriterion(ev, MAX_TIME, 200, true);
return true;
}
Aggregations