Search in sources :

Example 11 with Verify

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);
}
Also used : AssertTask(com.hazelcast.simulator.utils.AssertTask) Verify(com.hazelcast.simulator.test.annotations.Verify)

Example 12 with Verify

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");
}
Also used : ICacheCreateDestroyCounter(com.hazelcast.simulator.tests.icache.helpers.ICacheCreateDestroyCounter) Verify(com.hazelcast.simulator.test.annotations.Verify)

Example 13 with Verify

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");
}
Also used : ICacheListenerOperationCounter(com.hazelcast.simulator.tests.icache.helpers.ICacheListenerOperationCounter) Verify(com.hazelcast.simulator.test.annotations.Verify)

Example 14 with Verify

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);
        }
    });
}
Also used : AssertTask(com.hazelcast.simulator.utils.AssertTask) Verify(com.hazelcast.simulator.test.annotations.Verify)

Example 15 with Verify

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");
}
Also used : ICacheOperationCounter(com.hazelcast.simulator.tests.icache.helpers.ICacheOperationCounter) 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