use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapTTLTest method globalVerify.
@Verify
public void globalVerify() {
MapOperationCounter total = new MapOperationCounter();
for (MapOperationCounter counter : results) {
total.add(counter);
}
logger.info(name + ": " + total + " total of " + results.size());
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(name + ": Map should be empty, some TTL events are not processed", 0, map.size());
}
});
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapTransactionGetForUpdateTest method verify.
@Verify(global = false)
public void verify() {
IList<TxnCounter> counts = targetInstance.getList(name + "report");
TxnCounter total = new TxnCounter();
for (TxnCounter c : counts) {
total.add(c);
}
logger.info(name + ": " + total + " from " + counts.size() + " workers");
IList<long[]> allIncrements = targetInstance.getList(name + "res");
long[] expected = new long[keyCount];
for (long[] incs : allIncrements) {
for (int i = 0; i < incs.length; i++) {
expected[i] += incs[i];
}
}
IMap<Integer, Long> map = targetInstance.getMap(name);
int failures = 0;
for (int i = 0; i < keyCount; i++) {
if (expected[i] != map.get(i)) {
failures++;
logger.info(name + ": key=" + i + " expected " + expected[i] + " != " + "actual " + map.get(i));
}
}
assertEquals(name + ": " + failures + " key=>values have been incremented unExpected", 0, failures);
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapMaxSizeTest method globalVerify.
@Verify
public void globalVerify() {
MapMaxSizeOperationCounter total = new MapMaxSizeOperationCounter();
for (MapMaxSizeOperationCounter operationCounter : operationCounterList) {
total.add(operationCounter);
}
logger.info(format("Operation counters from %s: %s", name, total));
assertMapMaxSize();
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class ReplicatedTTL method localVerify.
@Verify(global = false)
public void localVerify() {
MapOperationCounter total = new MapOperationCounter();
for (MapOperationCounter counter : results) {
total.add(counter);
}
logger.info(name + ": " + total + " total of " + results.size());
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
logger.info(name + ": " + "assert map Size = " + map.size());
assertEquals(name + ": Replicated Map should be empty, some TTL events are not processed", 0, map.size());
}
});
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class ReliableTopicTest method verify.
@Verify(global = true)
public void verify() {
final long expectedCount = listenersPerTopic * totalMessagesSend.get();
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
long actualCount = 0;
for (MessageListenerImpl topicListener : listeners) {
actualCount += topicListener.received.get();
}
assertEquals("published messages don't match received messages", expectedCount, actualCount);
}
});
assertEquals("Failures found", 0, failures.get());
}
Aggregations