Search in sources :

Example 31 with Verify

use of com.hazelcast.simulator.test.annotations.Verify in project hazelcast-simulator by hazelcast.

the class TxnQueueWithLockTest method globalVerify.

@Verify
public void globalVerify() {
    IQueue queue = targetInstance.getQueue(name + 'q');
    IList<TxnCounter> results = targetInstance.getList(name + "results");
    TxnCounter total = new TxnCounter();
    for (TxnCounter counter : results) {
        total.add(counter);
    }
    logger.info(name + ": " + total + " from " + results.size() + " worker Threads  Queue size=" + queue.size());
    assertFalse(name + ": firstLock.isLocked()", firstLock.isLocked());
    assertFalse(name + ": secondLock.isLocked()", secondLock.isLocked());
// TODO: check if this assert can be re-enabled: assertEquals(total.committed - total.rolled, queue.size())
}
Also used : IQueue(com.hazelcast.core.IQueue) TxnCounter(com.hazelcast.simulator.tests.helpers.TxnCounter) Verify(com.hazelcast.simulator.test.annotations.Verify)

Aggregations

Verify (com.hazelcast.simulator.test.annotations.Verify)31 AssertTask (com.hazelcast.simulator.utils.AssertTask)7 ILock (com.hazelcast.core.ILock)4 MapOperationCounter (com.hazelcast.simulator.tests.map.helpers.MapOperationCounter)4 TxnCounter (com.hazelcast.simulator.tests.helpers.TxnCounter)3 MapStoreConfig (com.hazelcast.config.MapStoreConfig)2 DistributedObject (com.hazelcast.core.DistributedObject)2 DistributedObjectDestroyedException (com.hazelcast.spi.exception.DistributedObjectDestroyedException)2 CardinalityEstimator (com.hazelcast.cardinality.CardinalityEstimator)1 MapConfig (com.hazelcast.config.MapConfig)1 IAtomicLong (com.hazelcast.core.IAtomicLong)1 IQueue (com.hazelcast.core.IQueue)1 BaseThreadState (com.hazelcast.simulator.test.BaseThreadState)1 StopException (com.hazelcast.simulator.test.StopException)1 TestException (com.hazelcast.simulator.test.TestException)1 ICacheCreateDestroyCounter (com.hazelcast.simulator.tests.icache.helpers.ICacheCreateDestroyCounter)1 ICacheEntryListener (com.hazelcast.simulator.tests.icache.helpers.ICacheEntryListener)1 ICacheListenerOperationCounter (com.hazelcast.simulator.tests.icache.helpers.ICacheListenerOperationCounter)1 ICacheOperationCounter (com.hazelcast.simulator.tests.icache.helpers.ICacheOperationCounter)1 ICacheReadWriteCounter (com.hazelcast.simulator.tests.icache.helpers.ICacheReadWriteCounter)1