Search in sources :

Example 16 with CacheWriteSynchronizationMode

use of org.apache.ignite.cache.CacheWriteSynchronizationMode in project ignite by apache.

the class TxOptimisticDeadlockDetectionTest method testDeadlocksPartitioned.

/**
 * @throws Exception If failed.
 */
@Test
public void testDeadlocksPartitioned() throws Exception {
    for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
        doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY);
        doTestDeadlocks(createCache(PARTITIONED, syncMode, false), CUSTOM_START_KEY);
    }
}
Also used : CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) Test(org.junit.Test)

Example 17 with CacheWriteSynchronizationMode

use of org.apache.ignite.cache.CacheWriteSynchronizationMode in project ignite by apache.

the class TxOptimisticDeadlockDetectionTest method testDeadlocksPartitionedNear.

/**
 * @throws Exception If failed.
 */
@Test
public void testDeadlocksPartitionedNear() throws Exception {
    for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
        doTestDeadlocks(createCache(PARTITIONED, syncMode, true), ORDINAL_START_KEY);
        doTestDeadlocks(createCache(PARTITIONED, syncMode, true), CUSTOM_START_KEY);
    }
}
Also used : CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) Test(org.junit.Test)

Example 18 with CacheWriteSynchronizationMode

use of org.apache.ignite.cache.CacheWriteSynchronizationMode in project ignite by apache.

the class TxOptimisticDeadlockDetectionTest method testDeadlocksReplicated.

/**
 * @throws Exception If failed.
 */
@Test
public void testDeadlocksReplicated() throws Exception {
    for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
        doTestDeadlocks(createCache(REPLICATED, syncMode, false), ORDINAL_START_KEY);
        doTestDeadlocks(createCache(REPLICATED, syncMode, false), CUSTOM_START_KEY);
    }
}
Also used : CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) Test(org.junit.Test)

Example 19 with CacheWriteSynchronizationMode

use of org.apache.ignite.cache.CacheWriteSynchronizationMode in project ignite by apache.

the class TxPessimisticDeadlockDetectionTest method testDeadlocksPartitioned.

/**
 * @throws Exception If failed.
 */
@Test
public void testDeadlocksPartitioned() throws Exception {
    for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
        doTestDeadlocks(createCache(PARTITIONED, syncMode, false), ORDINAL_START_KEY);
        doTestDeadlocks(createCache(PARTITIONED, syncMode, false), CUSTOM_START_KEY);
    }
}
Also used : CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) Test(org.junit.Test)

Example 20 with CacheWriteSynchronizationMode

use of org.apache.ignite.cache.CacheWriteSynchronizationMode in project ignite by apache.

the class TxPessimisticDeadlockDetectionTest method testDeadlocksLocal.

/**
 * @throws Exception If failed.
 */
@Test
public void testDeadlocksLocal() throws Exception {
    for (CacheWriteSynchronizationMode syncMode : CacheWriteSynchronizationMode.values()) {
        IgniteCache cache = null;
        try {
            cache = createCache(LOCAL, syncMode, false);
            awaitPartitionMapExchange();
            doTestDeadlock(2, true, true, false, ORDINAL_START_KEY);
            doTestDeadlock(2, true, true, false, CUSTOM_START_KEY);
        } finally {
            if (cache != null)
                cache.destroy();
        }
    }
}
Also used : CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) IgniteCache(org.apache.ignite.IgniteCache) Test(org.junit.Test)

Aggregations

CacheWriteSynchronizationMode (org.apache.ignite.cache.CacheWriteSynchronizationMode)20 Test (org.junit.Test)9 ClusterNode (org.apache.ignite.cluster.ClusterNode)5 CacheAtomicityMode (org.apache.ignite.cache.CacheAtomicityMode)4 AffinityTopologyVersion (org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion)4 UUID (java.util.UUID)3 IgniteCache (org.apache.ignite.IgniteCache)3 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)3 HashSet (java.util.HashSet)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 CacheException (javax.cache.CacheException)1 Factory (javax.cache.configuration.Factory)1 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteClientDisconnectedException (org.apache.ignite.IgniteClientDisconnectedException)1 IgniteException (org.apache.ignite.IgniteException)1 CacheMode (org.apache.ignite.cache.CacheMode)1 FifoEvictionPolicyFactory (org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicyFactory)1 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)1 DiscoveryEvent (org.apache.ignite.events.DiscoveryEvent)1