Package com.hazelcast.test

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()


    @Test(timeout = 90000)
    public void testEventService() throws Exception {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);

        HazelcastInstanceProxy h1 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h2 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h3 = (HazelcastInstanceProxy) factory.newHazelcastInstance();

        CountDownLatch l1 = new CountDownLatch(1000);
        CountDownLatch l2 = new CountDownLatch(1000);
View Full Code Here


    @Test(timeout = 90000)
    public void testEventService() throws Exception {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);

        HazelcastInstanceProxy h1 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h2 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h3 = (HazelcastInstanceProxy) factory.newHazelcastInstance();

        CountDownLatch l1 = new CountDownLatch(1000);
        CountDownLatch l2 = new CountDownLatch(1000);
        CountDownLatch l3 = new CountDownLatch(1000);
View Full Code Here

    public void testEventService() throws Exception {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);

        HazelcastInstanceProxy h1 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h2 = (HazelcastInstanceProxy) factory.newHazelcastInstance();
        HazelcastInstanceProxy h3 = (HazelcastInstanceProxy) factory.newHazelcastInstance();

        CountDownLatch l1 = new CountDownLatch(1000);
        CountDownLatch l2 = new CountDownLatch(1000);
        CountDownLatch l3 = new CountDownLatch(1000);
View Full Code Here

    @Test
    @ClientCompatibleTest
    public void testLatchMigration() throws InterruptedException {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(5);
        HazelcastInstance hz1 = factory.newHazelcastInstance();
        HazelcastInstance hz2 = factory.newHazelcastInstance();
        warmUpPartitions(hz2, hz1);

        ICountDownLatch latch1 = hz1.getCountDownLatch("test");
        latch1.trySetCount(10);
View Full Code Here

    @Test
    @ClientCompatibleTest
    public void testLatchMigration() throws InterruptedException {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(5);
        HazelcastInstance hz1 = factory.newHazelcastInstance();
        HazelcastInstance hz2 = factory.newHazelcastInstance();
        warmUpPartitions(hz2, hz1);

        ICountDownLatch latch1 = hz1.getCountDownLatch("test");
        latch1.trySetCount(10);
        Thread.sleep(500);
View Full Code Here

        latch2.countDown();
        assertEquals(9, latch1.getCount());
        hz1.shutdown();
        assertEquals(9, latch2.getCount());

        HazelcastInstance hz3 = factory.newHazelcastInstance();
        warmUpPartitions(hz3);
        ICountDownLatch latch3 = hz3.getCountDownLatch("test");
        latch3.countDown();
        assertEquals(8, latch3.getCount());
View Full Code Here

        hz2.shutdown();
        latch3.countDown();
        assertEquals(7, latch3.getCount());

        HazelcastInstance hz4 = factory.newHazelcastInstance();
        HazelcastInstance hz5 = factory.newHazelcastInstance();
        warmUpPartitions(hz5, hz4);
        Thread.sleep(250);

        hz3.shutdown();
View Full Code Here

        hz2.shutdown();
        latch3.countDown();
        assertEquals(7, latch3.getCount());

        HazelcastInstance hz4 = factory.newHazelcastInstance();
        HazelcastInstance hz5 = factory.newHazelcastInstance();
        warmUpPartitions(hz5, hz4);
        Thread.sleep(250);

        hz3.shutdown();
        ICountDownLatch latch4 = hz4.getCountDownLatch("test");
View Full Code Here

@Category(QuickTest.class)
public class JCacheListenerTest extends HazelcastTestSupport {

    protected CachingProvider getCachingProvider() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
        HazelcastInstance hz1 = factory.newHazelcastInstance();
        HazelcastInstance hz2 = factory.newHazelcastInstance();

        return HazelcastServerCachingProvider.createCachingProvider(hz2);
    }
View Full Code Here

public class JCacheListenerTest extends HazelcastTestSupport {

    protected CachingProvider getCachingProvider() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
        HazelcastInstance hz1 = factory.newHazelcastInstance();
        HazelcastInstance hz2 = factory.newHazelcastInstance();

        return HazelcastServerCachingProvider.createCachingProvider(hz2);
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.