use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class ITopicTest method verify.
@Verify(global = true)
public void verify() {
if (maxVerificationTimeSeconds < 0) {
return;
}
final long expectedCount = totalExpectedCounter.get();
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
long actualCount = 0;
for (TopicListener topicListener : listeners) {
actualCount += topicListener.count;
}
assertEquals("published messages don't match received messages", expectedCount, actualCount);
}
}, maxVerificationTimeSeconds);
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class CreateDestroyICacheTest method globalVerify.
@Verify
public void globalVerify() {
ICacheCreateDestroyCounter total = new ICacheCreateDestroyCounter();
for (ICacheCreateDestroyCounter counter : counters) {
total.add(counter);
}
logger.info(name + ": " + total + " from " + counters.size() + " worker threads");
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class AddRemoveListenerICacheTest method globalVerify.
@Verify(global = true)
public void globalVerify() {
ICacheListenerOperationCounter total = new ICacheListenerOperationCounter();
for (ICacheListenerOperationCounter i : results) {
total.add(i);
}
logger.info(name + ": " + total + " from " + results.size() + " worker threads");
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class ExpiryICacheTest method globalVerify.
@Verify(global = true)
public void globalVerify() {
sleepSeconds(61);
// provoke expire after TTL
for (int i = 0; i < keyCount; i++) {
cache.containsKey(i);
}
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
int cacheSize = cache.size();
logger.info(name + " ICache size: " + cacheSize);
assertEquals(name + " ICache should be empty, but TTL events are not processed", 0, cacheSize);
}
});
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MangleICacheTest method globalVerify.
@Verify
public void globalVerify() {
ICacheOperationCounter total = new ICacheOperationCounter();
for (ICacheOperationCounter counter : results) {
total.add(counter);
}
logger.info(name + ": " + total + " from " + results.size() + " worker threads");
}
Aggregations