Search in sources :

Example 16 with Setup

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

the class LongSerializableCacheTest method setUp.

@Setup
public void setUp() {
    CacheManager cacheManager = createCacheManager(targetInstance);
    cache = cacheManager.getCache(name);
}
Also used : CacheUtils.createCacheManager(com.hazelcast.simulator.tests.icache.helpers.CacheUtils.createCacheManager) CacheManager(javax.cache.CacheManager) Setup(com.hazelcast.simulator.test.annotations.Setup)

Example 17 with Setup

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

the class AtomicReferenceTest method setup.

@Setup
public void setup() {
    values = new Object[valueCount];
    Random random = new Random();
    for (int i = 0; i < valueCount; i++) {
        if (useStringValue) {
            values[i] = generateString(valueLength);
        } else {
            values[i] = generateByteArray(random, valueLength);
        }
    }
    counters = getCounters();
    String[] names = generateStringKeys(name, countersLength, keyLocality, targetInstance);
    for (int i = 0; i < counters.length; i++) {
        IAtomicReference<Object> atomicReference = targetInstance.getAtomicReference(names[i]);
        atomicReference.set(values[random.nextInt(values.length)]);
        counters[i] = atomicReference;
    }
}
Also used : Random(java.util.Random) GeneratorUtils.generateString(com.hazelcast.simulator.utils.GeneratorUtils.generateString) Setup(com.hazelcast.simulator.test.annotations.Setup)

Example 18 with Setup

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

the class BatchingICacheTest method setup.

@Setup
public void setup() {
    CacheManager cacheManager = createCacheManager(targetInstance);
    cache = (ICache<Object, Object>) cacheManager.getCache(name);
}
Also used : CacheUtils.createCacheManager(com.hazelcast.simulator.tests.icache.helpers.CacheUtils.createCacheManager) CacheManager(javax.cache.CacheManager) Setup(com.hazelcast.simulator.test.annotations.Setup)

Example 19 with Setup

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

the class CasICacheTest method setup.

@Setup
public void setup() {
    resultsPerWorker = targetInstance.getList(name);
    CacheManager cacheManager = createCacheManager(targetInstance);
    cache = cacheManager.getCache(name);
}
Also used : CacheUtils.createCacheManager(com.hazelcast.simulator.tests.icache.helpers.CacheUtils.createCacheManager) CacheManager(javax.cache.CacheManager) Setup(com.hazelcast.simulator.test.annotations.Setup)

Example 20 with Setup

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

the class PartitionServiceMBeanTest method setUp.

@Setup
public void setUp() throws Exception {
    this.mBeanServer = ManagementFactory.getPlatformMBeanServer();
    this.objectName = new ObjectName("com.hazelcast:instance=" + targetInstance.getName() + ",name=" + targetInstance.getName() + ",type=HazelcastInstance.PartitionServiceMBean");
}
Also used : ObjectName(javax.management.ObjectName) Setup(com.hazelcast.simulator.test.annotations.Setup)

Aggregations

Setup (com.hazelcast.simulator.test.annotations.Setup)25 CacheManager (javax.cache.CacheManager)16 CacheUtils.createCacheManager (com.hazelcast.simulator.tests.icache.helpers.CacheUtils.createCacheManager)14 Random (java.util.Random)3 RecordingCacheLoader (com.hazelcast.simulator.tests.icache.helpers.RecordingCacheLoader)2 BucketSettings (com.couchbase.client.java.cluster.BucketSettings)1 ClusterManager (com.couchbase.client.java.cluster.ClusterManager)1 CacheConfig (com.hazelcast.config.CacheConfig)1 Config (com.hazelcast.config.Config)1 MapConfig (com.hazelcast.config.MapConfig)1 MaxSizeConfig (com.hazelcast.config.MaxSizeConfig)1 Member (com.hazelcast.core.Member)1 Partition (com.hazelcast.core.Partition)1 PartitionService (com.hazelcast.core.PartitionService)1 HazelcastThreadGroup (com.hazelcast.instance.HazelcastThreadGroup)1 Node (com.hazelcast.instance.Node)1 MetricsRegistry (com.hazelcast.internal.metrics.MetricsRegistry)1 IOThreadingModel (com.hazelcast.internal.networking.IOThreadingModel)1 LoggingService (com.hazelcast.logging.LoggingService)1 Address (com.hazelcast.nio.Address)1