Examples of newHazelcastInstance()


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

     */
    @Test
    public void testIsLocked() throws InterruptedException {
        final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(3);
        final HazelcastInstance h1 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance h2 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance h3 = nodeFactory.newHazelcastInstance();
        final String key = "testLockIsLocked";
        final ILock lock = h1.getLock(key);
        final ILock lock2 = h2.getLock(key);

View Full Code Here

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

    @Test
    public void testIsLocked() throws InterruptedException {
        final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(3);
        final HazelcastInstance h1 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance h2 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance h3 = nodeFactory.newHazelcastInstance();
        final String key = "testLockIsLocked";
        final ILock lock = h1.getLock(key);
        final ILock lock2 = h2.getLock(key);

        assertFalse(lock.isLocked());
View Full Code Here

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

    //todo:   what does isLocked2 test?
    @Test(timeout = 60000)
    public void testIsLocked2() throws Exception {
        final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(2);
        final HazelcastInstance instance1 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance instance2 = nodeFactory.newHazelcastInstance();

        final String key = randomString();

        final ILock lock = instance1.getLock(key);
View Full Code Here

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

    //todo:   what does isLocked2 test?
    @Test(timeout = 60000)
    public void testIsLocked2() throws Exception {
        final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(2);
        final HazelcastInstance instance1 = nodeFactory.newHazelcastInstance();
        final HazelcastInstance instance2 = nodeFactory.newHazelcastInstance();

        final String key = randomString();

        final ILock lock = instance1.getLock(key);
        lock.lock();
View Full Code Here

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

    }

    @Test
    public void isClusterSafe_multiNode() throws Exception {
        final TestHazelcastInstanceFactory factory = new TestHazelcastInstanceFactory(2);
        final HazelcastInstance node1 = factory.newHazelcastInstance();
        final HazelcastInstance node2 = factory.newHazelcastInstance();
        final boolean safe1 = node1.getPartitionService().isClusterSafe();
        final boolean safe2 = node2.getPartitionService().isClusterSafe();

        assertTrue(safe1);
View Full Code Here

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

    @Test
    public void isClusterSafe_multiNode() throws Exception {
        final TestHazelcastInstanceFactory factory = new TestHazelcastInstanceFactory(2);
        final HazelcastInstance node1 = factory.newHazelcastInstance();
        final HazelcastInstance node2 = factory.newHazelcastInstance();
        final boolean safe1 = node1.getPartitionService().isClusterSafe();
        final boolean safe2 = node2.getPartitionService().isClusterSafe();

        assertTrue(safe1);
        assertTrue(safe2);
View Full Code Here

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

    }

    @Test
    public void isLocalMemberSafe_multiNode() throws Exception {
        final TestHazelcastInstanceFactory factory = new TestHazelcastInstanceFactory(2);
        final HazelcastInstance node1 = factory.newHazelcastInstance();
        final HazelcastInstance node2 = factory.newHazelcastInstance();
        final boolean safe1 = node1.getPartitionService().isLocalMemberSafe();
        final boolean safe2 = node2.getPartitionService().isLocalMemberSafe();

        assertTrue(safe1);
View Full Code Here

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

    @Test
    public void isLocalMemberSafe_multiNode() throws Exception {
        final TestHazelcastInstanceFactory factory = new TestHazelcastInstanceFactory(2);
        final HazelcastInstance node1 = factory.newHazelcastInstance();
        final HazelcastInstance node2 = factory.newHazelcastInstance();
        final boolean safe1 = node1.getPartitionService().isLocalMemberSafe();
        final boolean safe2 = node2.getPartitionService().isLocalMemberSafe();

        assertTrue(safe1);
        assertTrue(safe2);
View Full Code Here

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

public class TxnMultiMapTest extends HazelcastTestSupport {

    @Test
    public void testTxnCommit() throws TransactionException {
        final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
        final HazelcastInstance h1 = factory.newHazelcastInstance();
        final HazelcastInstance h2 = factory.newHazelcastInstance();
        final String map1 = "map1";
        final String map2 = "map2";
        final String key = "1";
View Full Code Here

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

    @Test
    public void testTxnCommit() throws TransactionException {
        final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
        final HazelcastInstance h1 = factory.newHazelcastInstance();
        final HazelcastInstance h2 = factory.newHazelcastInstance();
        final String map1 = "map1";
        final String map2 = "map2";
        final String key = "1";

        boolean b = h1.executeTransaction(new TransactionalTask<Boolean>() {
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.