use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapAsyncOpsTest method globalVerify.
@Verify(global = true)
public void globalVerify() {
MapOperationCounter totalMapOperationsCount = new MapOperationCounter();
for (MapOperationCounter mapOperationsCount : results) {
totalMapOperationsCount.add(mapOperationsCount);
}
logger.info(name + ": " + totalMapOperationsCount + " total of " + results.size());
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapTransactionContextConflictTest method verify.
@Verify(global = false)
public void verify() {
IList<TxnCounter> counts = targetInstance.getList(name + "count");
TxnCounter total = new TxnCounter();
for (TxnCounter c : counts) {
total.add(c);
}
logger.info(name + ": " + total + " from " + counts.size() + " worker threads");
IList<long[]> allIncrements = targetInstance.getList(name + "inc");
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 MapPredicateTest method globalVerify.
@Verify
public void globalVerify() {
PredicateOperationCounter total = new PredicateOperationCounter();
for (PredicateOperationCounter operationCounter : operationCounterList) {
total.add(operationCounter);
}
logger.info(format("Operation counters from %s: %s", name, total));
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class MapReduceTest method globalVerify.
@Verify(global = true)
public void globalVerify() {
MapReduceOperationCounter total = new MapReduceOperationCounter();
for (MapReduceOperationCounter operationCounter : operationCounterList) {
total.add(operationCounter);
}
logger.info(name + ": " + total + " from " + operationCounterList.size() + " worker threads");
}
use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.
the class QueueTest method verify.
@Verify
public void verify() {
long expected = totalCounter.get();
long actual = 0;
for (Queue<Long> queue : queues) {
for (Long queueCounter : queue) {
actual += queueCounter;
}
}
assertEquals(expected, actual);
}
Aggregations