http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java index a5f1120..e4a873b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiThreadedSelfTest.java index f6e5245..f809185 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiThreadedSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.log4j.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxReadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxReadTest.java index b44dc61..d56e3dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxReadTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.cache.GridCacheMode; -import org.gridgain.grid.kernal.processors.cache.GridCacheAbstractTxReadTest; +import org.apache.ignite.internal.processors.cache.GridCacheAbstractTxReadTest; /** * Checks transactional reads for local cache. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxSingleThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxSingleThreadedSelfTest.java index f533081..08c73c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxSingleThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxSingleThreadedSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.log4j.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java index 4ba4d57..b78c84f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java @@ -21,8 +21,8 @@ import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.eviction.fifo.*; import org.apache.ignite.cache.store.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.jetbrains.annotations.*; import javax.cache.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java index 8d8a480..a8087c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java @@ -24,8 +24,8 @@ import org.apache.ignite.cache.eviction.*; import org.apache.ignite.cache.eviction.fifo.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.transactions.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java index dc69ffe..a8b1ff9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java @@ -22,8 +22,8 @@ import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cache.affinity.consistenthash.*; import org.apache.ignite.cluster.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalMetricsSelfTest.java index 65be0f2..f6e091e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalMetricsSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheAtomicWriteOrderMode.*; import static org.apache.ignite.cache.GridCacheAtomicityMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java index b35b326..69bc0d7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheDaemonNodeLocalSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.*; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java index 0cfd96f..ea862f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheExLocalFullApiSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; /** * Tests private cache interface on local cache. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java index adf33fd..22eb911 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicApiSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreMultithreadedSelfTest.java index 36ff9ed..bde6e25 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreMultithreadedSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; /** * Local test. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java index d34fc29..7645e9f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalBasicStoreSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java index 50f258d..af952be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java @@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.transactions.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.spi.swapspace.file.*; import org.apache.ignite.internal.util.typedef.*; import org.jetbrains.annotations.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java index 8269b0d..c3456d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalEvictionEventSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheAtomicityMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java index 953a032..b6ef30c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiMultithreadedSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java index b50a2bd..b1487fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalFullApiSelfTest.java @@ -20,8 +20,8 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; import org.apache.ignite.cluster.*; import org.apache.ignite.configuration.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.internal.util.typedef.*; import java.util.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java index 236bbbd..9a6e6f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalGetAndTransformStoreSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIteratorsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIteratorsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIteratorsSelfTest.java index d94f96c..815835c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIteratorsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIteratorsSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import java.io.*; import java.util.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMetricsSelfTest.java index daae76c..a52fad1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalMetricsSelfTest.java @@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalProjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalProjectionSelfTest.java index 4a1195e..c7b87a9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalProjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalProjectionSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxExceptionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxExceptionSelfTest.java index dbd0a2e..4b13ce0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxExceptionSelfTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.LOCAL; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java index e4795f2..913827a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.log4j.*; -import org.gridgain.grid.kernal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxReadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxReadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxReadTest.java index a6e6c6b..0fc3b36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxReadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxReadTest.java @@ -18,7 +18,7 @@ package org.apache.ignite.internal.processors.cache.local; import org.apache.ignite.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; /** * Checks transactional reads for local cache. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java index 752a49e..b082238 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.log4j.*; -import org.gridgain.grid.kernal.processors.cache.*; import static org.apache.ignite.cache.GridCacheMode.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/storevalbytes/GridCacheStoreValueBytesNode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/storevalbytes/GridCacheStoreValueBytesNode.java b/modules/core/src/test/java/org/apache/ignite/storevalbytes/GridCacheStoreValueBytesNode.java index 11fbc74..f2a89ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/storevalbytes/GridCacheStoreValueBytesNode.java +++ b/modules/core/src/test/java/org/apache/ignite/storevalbytes/GridCacheStoreValueBytesNode.java @@ -20,7 +20,7 @@ package org.apache.ignite.storevalbytes; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.configuration.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.spi.communication.tcp.*; import org.apache.ignite.spi.discovery.tcp.*; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheEvictionSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheEvictionSelfTestSuite.java index 051cd62..7871c66 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheEvictionSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheEvictionSelfTestSuite.java @@ -18,7 +18,7 @@ package org.apache.ignite.testsuites; import junit.framework.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.apache.ignite.internal.processors.cache.eviction.*; import org.apache.ignite.internal.processors.cache.eviction.fifo.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheWriteBehindTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheWriteBehindTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheWriteBehindTestSuite.java index 4c61a19..9e6e538 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheWriteBehindTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/GridCacheWriteBehindTestSuite.java @@ -19,7 +19,6 @@ package org.apache.ignite.testsuites; import junit.framework.*; import org.apache.ignite.internal.processors.cache.*; -import org.gridgain.grid.kernal.processors.cache.*; /** * Test suite that contains all tests for {@link GridCacheWriteBehindStore}. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/testsuites/GridUtilSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/GridUtilSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/GridUtilSelfTestSuite.java index dddc773..1492c76 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/GridUtilSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/GridUtilSelfTestSuite.java @@ -18,10 +18,10 @@ package org.apache.ignite.testsuites; import junit.framework.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.util.*; import org.apache.ignite.util.mbeans.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.lang.*; import org.apache.ignite.spi.discovery.*; import org.apache.ignite.thread.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridRestartTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridRestartTestSuite.java index 2b870ea..b66561b 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridRestartTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridRestartTestSuite.java @@ -18,7 +18,7 @@ package org.apache.ignite.testsuites.bamboo; import junit.framework.*; -import org.gridgain.grid.kernal.processors.cache.*; +import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridTestSuite.java index 36b38ca..5a00874 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/bamboo/GridDataGridTestSuite.java @@ -28,7 +28,6 @@ import org.apache.ignite.internal.processors.cache.expiry.*; import org.apache.ignite.internal.processors.cache.integration.*; import org.apache.ignite.testsuites.*; import org.apache.ignite.cache.store.jdbc.*; -import org.gridgain.grid.kernal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java deleted file mode 100644 index 35bc37c..0000000 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.gridgain.grid.kernal.processors.cache; - -import org.apache.ignite.configuration.*; -import org.apache.ignite.spi.discovery.tcp.*; -import org.apache.ignite.spi.discovery.tcp.ipfinder.*; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; -import org.apache.ignite.testframework.junits.common.*; - -/** - * Base class for various tests for byte array values. - */ -public abstract class GridCacheAbstractByteArrayValuesSelfTest extends GridCommonAbstractTest { - /** Regular cache name. */ - protected static final String CACHE_REGULAR = "cache"; - - /** Offheap cache name. */ - protected static final String CACHE_OFFHEAP = "cache_offheap"; - - /** Offheap tiered cache name. */ - protected static final String CACHE_OFFHEAP_TIERED = "cache_offheap_tiered"; - - /** Key 1. */ - protected static final Integer KEY_1 = 1; - - /** Key 2. */ - protected static final Integer KEY_2 = 2; - - /** Use special key for swap test, otherwise entry with readers is not evicted. */ - protected static final Integer SWAP_TEST_KEY = 3; - - /** Shared IP finder. */ - private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration c = super.getConfiguration(gridName); - - TcpDiscoverySpi disco = new TcpDiscoverySpi(); - - disco.setIpFinder(IP_FINDER); - - c.setDiscoverySpi(disco); - - return c; - } - - /** {@inheritDoc} */ - @Override protected void afterTestsStopped() throws Exception { - stopAllGrids(); - } - - /** - * Wrap provided values into byte array. - * - * @param vals Values. - * @return Byte array. - */ - protected byte[] wrap(int... vals) { - byte[] res = new byte[vals.length]; - - for (int i = 0; i < vals.length; i++) - res[i] = (byte)vals[i]; - - return res; - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java deleted file mode 100644 index 42780de..0000000 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFailoverSelfTest.java +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.gridgain.grid.kernal.processors.cache; - -import org.apache.ignite.*; -import org.apache.ignite.cache.*; -import org.apache.ignite.cluster.*; -import org.apache.ignite.configuration.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.resources.*; -import org.apache.ignite.transactions.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.apache.ignite.testframework.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -import static org.apache.ignite.cache.GridCacheMode.*; -import static org.apache.ignite.cache.GridCachePreloadMode.*; -import static org.apache.ignite.transactions.IgniteTxConcurrency.*; -import static org.apache.ignite.transactions.IgniteTxIsolation.*; - -/** - * Failover tests for cache. - */ -public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstractSelfTest { - /** */ - private static final long TEST_TIMEOUT = 3 * 60 * 1000; - - /** */ - private static final String NEW_GRID_NAME = "newGrid"; - - /** */ - private static final int ENTRY_CNT = 100; - - /** */ - private static final int TOP_CHANGE_CNT = 5; - - /** */ - private static final int TOP_CHANGE_THREAD_CNT = 3; - - /** {@inheritDoc} */ - @Override protected long getTestTimeout() { - return TEST_TIMEOUT; - } - - /** {@inheritDoc} */ - @Override protected int gridCount() { - return 3; - } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - cfg.getTransactionsConfiguration().setTxSerializableEnabled(true); - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { - CacheConfiguration cfg = super.cacheConfiguration(gridName); - - cfg.setPreloadMode(SYNC); - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - // No-op - } - - /** {@inheritDoc} */ - @Override protected void afterTestsStopped() throws Exception { - // No-op - } - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - startGridsMultiThreaded(gridCount()); - - super.beforeTest(); - } - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - stopAllGrids(); - } - - /** - * @throws Exception If failed. - */ - public void testTopologyChange() throws Exception { - testTopologyChange(null, null); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticReadCommittedTxTopologyChange() throws Exception { - testTopologyChange(OPTIMISTIC, READ_COMMITTED); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticRepeatableReadTxTopologyChange() throws Exception { - testTopologyChange(OPTIMISTIC, REPEATABLE_READ); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticSerializableTxTopologyChange() throws Exception { - testTopologyChange(OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticReadCommittedTxTopologyChange() throws Exception { - testTopologyChange(PESSIMISTIC, READ_COMMITTED); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticRepeatableReadTxTopologyChange() throws Exception { - testTopologyChange(PESSIMISTIC, REPEATABLE_READ); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticSerializableTxTopologyChange() throws Exception { - testTopologyChange(PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - public void testConstantTopologyChange() throws Exception { - testConstantTopologyChange(null, null); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticReadCommittedTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(OPTIMISTIC, READ_COMMITTED); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticRepeatableReadTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(OPTIMISTIC, REPEATABLE_READ); - } - - /** - * @throws Exception If failed. - */ - public void testOptimisticSerializableTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticReadCommittedTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(PESSIMISTIC, READ_COMMITTED); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticRepeatableReadTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(PESSIMISTIC, REPEATABLE_READ); - } - - /** - * @throws Exception If failed. - */ - public void testPessimisticSerializableTxConstantTopologyChange() throws Exception { - testConstantTopologyChange(PESSIMISTIC, SERIALIZABLE); - } - - /** - * @param concurrency Concurrency control. - * @param isolation Isolation level. - * @throws Exception If failed. - */ - private void testTopologyChange(@Nullable IgniteTxConcurrency concurrency, - @Nullable IgniteTxIsolation isolation) throws Exception { - boolean tx = concurrency != null && isolation != null; - - if (tx) - put(cache(), ENTRY_CNT, concurrency, isolation); - else - put(cache(), ENTRY_CNT); - - Ignite g = startGrid(NEW_GRID_NAME); - - check(cache(g), ENTRY_CNT); - - int half = ENTRY_CNT / 2; - - if (tx) { - remove(cache(g), half, concurrency, isolation); - put(cache(g), half, concurrency, isolation); - } - else { - remove(cache(g), half); - put(cache(g), half); - } - - stopGrid(NEW_GRID_NAME); - - check(cache(), ENTRY_CNT); - } - - /** - * @param concurrency Concurrency control. - * @param isolation Isolation level. - * @throws Exception If failed. - */ - private void testConstantTopologyChange(@Nullable final IgniteTxConcurrency concurrency, - @Nullable final IgniteTxIsolation isolation) throws Exception { - final boolean tx = concurrency != null && isolation != null; - - if (tx) - put(cache(), ENTRY_CNT, concurrency, isolation); - else - put(cache(), ENTRY_CNT); - - check(cache(), ENTRY_CNT); - - final int half = ENTRY_CNT / 2; - - IgniteFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new CA() { - @Override public void apply() { - info("Run topology change."); - - try { - for (int i = 0; i < TOP_CHANGE_CNT; i++) { - info("Topology change " + i); - - String name = UUID.randomUUID().toString(); - - try { - final Ignite g = startGrid(name); - - for (int k = half; k < ENTRY_CNT; k++) - assertNotNull("Failed to get key: 'key" + k + "'", cache(g).get("key" + k)); - } - finally { - G.stop(name, false); - } - } - } - catch (Exception e) { - throw F.wrap(e); - } - } - }, TOP_CHANGE_THREAD_CNT, "topology-change-thread"); - - while (!fut.isDone()) { - if (tx) { - remove(cache(), half, concurrency, isolation); - put(cache(), half, concurrency, isolation); - } - else { - remove(cache(), half); - put(cache(), half); - } - } - - fut.get(); - } - - /** - * @param cache Cache. - * @param cnt Entry count. - * @throws IgniteCheckedException If failed. - */ - private void put(GridCacheProjection<String, Integer> cache, int cnt) throws Exception { - try { - for (int i = 0; i < cnt; i++) - assertTrue("Failed to put key: 'key" + i + "'", cache.putx("key" + i, i)); - } - catch (IgniteCheckedException e) { - // It is ok to fail with topology exception. - if (!X.hasCause(e, ClusterTopologyException.class)) - throw e; - } - } - - /** - * @param cache Cache. - * @param cnt Entry count. - * @param concurrency Concurrency control. - * @param isolation Isolation level. - * @throws IgniteCheckedException If failed. - */ - private void put(GridCacheProjection<String, Integer> cache, final int cnt, - IgniteTxConcurrency concurrency, IgniteTxIsolation isolation) throws Exception { - try { - info("Putting values to cache [0," + cnt + ')'); - - CU.inTx(cache, concurrency, isolation, new CIX1<GridCacheProjection<String, Integer>>() { - @Override public void applyx(GridCacheProjection<String, Integer> cache) - throws IgniteCheckedException { - for (int i = 0; i < cnt; i++) - assertTrue("Failed to put key: 'key" + i + "'", cache.putx("key" + i, i)); - } - }); - } - catch (IgniteCheckedException e) { - // It is ok to fail with topology exception. - if (!X.hasCause(e, ClusterTopologyException.class)) - throw e; - else - info("Failed to put values to cache due to topology exception [0," + cnt + ')'); - } - } - - /** - * @param cache Cache. - * @param cnt Entry count. - * @throws IgniteCheckedException If failed. - */ - private void remove(GridCacheProjection<String, Integer> cache, int cnt) throws Exception { - try { - for (int i = 0; i < cnt; i++) - cache.removex("key" + i); - } - catch (IgniteCheckedException e) { - // It is ok to fail with topology exception. - if (!X.hasCause(e, ClusterTopologyException.class)) - throw e; - } - } - - /** - * @param cache Cache. - * @param cnt Entry count. - * @param concurrency Concurrency control. - * @param isolation Isolation level. - * @throws IgniteCheckedException If failed. - */ - private void remove(GridCacheProjection<String, Integer> cache, final int cnt, - IgniteTxConcurrency concurrency, IgniteTxIsolation isolation) throws Exception { - try { - info("Removing values form cache [0," + cnt + ')'); - - CU.inTx(cache, concurrency, isolation, new CIX1<GridCacheProjection<String, Integer>>() { - @Override public void applyx(GridCacheProjection<String, Integer> cache) - throws IgniteCheckedException { - for (int i = 0; i < cnt; i++) - cache.removex("key" + i); - } - }); - } - catch (IgniteCheckedException e) { - // It is ok to fail with topology exception. - if (!X.hasCause(e, ClusterTopologyException.class)) - throw e; - else - info("Failed to remove values from cache due to topology exception [0," + cnt + ')'); - } - } - - /** - * @param cache Cache. - * @param expSize Minimum expected cache size. - * @throws IgniteCheckedException If failed. - */ - private void check(GridCacheProjection<String,Integer> cache, int expSize) throws IgniteCheckedException { - int size; - - if (cacheMode() == PARTITIONED) { - Collection<Integer> res = compute(cache.gridProjection()).broadcast(new IgniteCallable<Integer>() { - @IgniteInstanceResource - private Ignite g; - - @Override public Integer call() { - return cache(g).projection(F.<String, Integer>cachePrimary()).size(); - } - }); - - size = 0 ; - - for (Integer size0 : res) - size += size0; - } - else - size = cache.size(); - - assertTrue("Key set size is lesser then the expected size [size=" + size + ", expSize=" + expSize + ']', - size >= expSize); - - for (int i = 0; i < expSize; i++) - assertNotNull("Failed to get value for key: 'key" + i + "'", cache.get("key" + i)); - } - - /** - * @param g Grid. - * @return Cache. - */ - private GridCacheProjection<String,Integer> cache(Ignite g) { - return g.cache(null); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java deleted file mode 100644 index ef3a228..0000000 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.gridgain.grid.kernal.processors.cache; - -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.*; -import org.apache.ignite.cache.store.*; -import org.apache.ignite.lang.*; - -import java.util.concurrent.*; -import java.util.concurrent.atomic.*; - -import static org.apache.ignite.cache.GridCacheWriteSynchronizationMode.*; - -/** - * Tests cache flags. - */ -public abstract class GridCacheAbstractFlagsTest extends GridCacheAbstractSelfTest { - /** {@inheritDoc} */ - @Override protected int gridCount() { - return 6; - } - - /** {@inheritDoc} */ - @Override protected GridCacheWriteSynchronizationMode writeSynchronization() { - return FULL_ASYNC; - } - - /** {@inheritDoc} */ - @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { - CacheConfiguration c = super.cacheConfiguration(gridName); - - if (cacheMode() == GridCacheMode.PARTITIONED) - c.setBackups(1); - - return c; - } - - /** {@inheritDoc} */ - @Override protected boolean swapEnabled() { - return false; - } - - /** {@inheritDoc} */ - @Override protected CacheStore<?, ?> cacheStore() { - return null; - } - - /** - * Tests SYNC_COMMIT cache flag. - * - * @throws Exception If failed. - */ - public void testTestSyncCommitFlag() throws Exception { - for (int i = 0; i < 10; i++) { - final String key = "k" + i; - final Integer val = i; - - final CountDownLatch l = new CountDownLatch(1); - - final AtomicInteger cntr = new AtomicInteger(); - - IgniteFuture<?> f = multithreadedAsync(new Callable() { - @Override public Object call() throws Exception { - int idx = cntr.getAndIncrement() % gridCount(); - - GridCache<String, Integer> c = cache(idx); - - l.await(); - - assertEquals(val, c.get(key)); - - return null; - } - }, gridCount() * 3); - - cache(0).flagsOn(GridCacheFlag.SYNC_COMMIT).put(key, val); - - l.countDown(); - - f.get(); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java deleted file mode 100644 index a967321..0000000 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.gridgain.grid.kernal.processors.cache; - -import org.apache.ignite.*; -import org.apache.ignite.cache.*; -import org.apache.ignite.internal.util.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.testframework.*; - -import java.util.*; -import java.util.concurrent.atomic.*; - -/** - * Multithreaded cache API tests. - */ -public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends GridCacheAbstractSelfTest { - /** */ - private static final Random RND = new Random(); - - /** */ - private static final int WRITE_THREAD_CNT = 3; - - /** */ - private static final int READ_THREAD_CNT = 3; - - /** */ - private static final String WRITE_THREAD_NAME = "write-thread"; - - /** */ - private static final String READ_THREAD_NAME = "read-thread"; - - /** */ - private static final int PUT_CNT = 100; - - /** */ - private final AtomicInteger cnt = new AtomicInteger(); - - /** */ - private final AtomicBoolean guard = new AtomicBoolean(); - - /** */ - private final Collection<Integer> set = new GridConcurrentHashSet<>(); - - /** {@inheritDoc} */ - @Override protected void beforeTest() throws Exception { - super.beforeTest(); - - cnt.set(0); - guard.set(false); - set.clear(); - } - - /** - * @param c Test closure. - * @throws Exception In case of error. - */ - private void runTest(final IgniteInClosure<GridCache<String, Integer>> c) throws Exception { - final IgniteFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new CAX() { - @Override public void applyx() throws IgniteCheckedException { - while (true) { - int i = cnt.getAndIncrement(); - - if (i >= PUT_CNT) - break; - - cache().put("key" + i, i); - - set.add(i); - - if (i > 10) - guard.compareAndSet(false, true); - } - } - }, WRITE_THREAD_CNT, WRITE_THREAD_NAME); - - IgniteFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new CA() { - @Override public void apply() { - GridCache<String, Integer> cache = cache(); - - while (!fut1.isDone()) - if (guard.get()) - c.apply(cache); - } - }, READ_THREAD_CNT, READ_THREAD_NAME); - - fut1.get(); - fut2.get(); - - checkConsistency(); - } - - /** - * @throws IgniteCheckedException If failed. - */ - private void checkConsistency() throws IgniteCheckedException { - for (GridCacheEntry<String, Integer> e : cache()) - for (int i = 1; i < gridCount(); i++) { - Integer val = cache(i).get(e.getKey()); - - if (val == null) - assert e.get() == null; - else - assert val.equals(e.get()); - } - } - - /** - * @return Random. - */ - private int random() { - int rnd; - - do - rnd = RND.nextInt(PUT_CNT); - while (!set.contains(rnd)); - - return rnd; - } - - /** - * @param fromIncl Inclusive start of the range. - * @param toExcl Exclusive stop of the range. - * @return Range of keys. - */ - private Collection<String> rangeKeys(int fromIncl, int toExcl) { - return F.transform(F.range(fromIncl, toExcl), new C1<Integer, String>() { - @Override public String apply(Integer i) { - return "key" + i; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testContainsKey() throws Exception { - runTest(new CI1<GridCache<String,Integer>>() { - @Override public void apply(GridCache<String, Integer> cache) { - assert cache.containsKey("key" + random()); - assert !cache.containsKey("wrongKey"); - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testContainsKeyFiltered() throws Exception { - runTest(new CI1<GridCache<String,Integer>>() { - @Override public void apply(GridCache<String, Integer> cache) { - assert cache.projection(F.<String, Integer>cacheHasPeekValue()).containsKey("key"); - assert !cache.projection(F.<String, Integer>cacheNoPeekValue()).containsKey("key" + random()); - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testContainsValue() throws Exception { - runTest(new CI1<GridCache<String,Integer>>() { - @Override public void apply(GridCache<String, Integer> cache) { - assert cache.containsValue(random()); - assert !cache.containsValue(-1); - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testContainsValueFiltered() throws Exception { - runTest(new CI1<GridCache<String,Integer>>() { - @Override public void apply(GridCache<String, Integer> cache) { - assert cache.projection(F.<String, Integer>cacheHasPeekValue()).containsValue(random()); - assert !cache.projection(F.<String, Integer>cacheNoPeekValue()).containsValue(random()); - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testForAll() throws Exception { - runTest(new CI1<GridCache<String,Integer>>() { - @Override public void apply(GridCache<String, Integer> cache) { - assert cache.forAll(new P1<GridCacheEntry<String, Integer>>() { - @Override public boolean apply(GridCacheEntry<String, Integer> e) { - Integer val = e.peek(); - - return val == null || val <= PUT_CNT; - } - }); - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testGet() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd = random(); - - assert cache.get("key" + rnd) == rnd; - assert cache.get("wrongKey") == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testGetAsync() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd = random(); - - assert cache.getAsync("key" + rnd).get() == rnd; - assert cache.getAsync("wrongKey").get() == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testGetAll() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd1 = random(); - int rnd2 = random(); - - Map<String, Integer> map = cache.getAll(F.asList("key" + rnd1, "key" + rnd2)); - - assert map.size() == (rnd1 != rnd2 ? 2 : 1); - assert map.get("key" + rnd1) == rnd1; - assert map.get("key" + rnd2) == rnd2; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testGetAllAsync() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd1 = random(); - int rnd2 = random(); - - Map<String, Integer> map = cache.getAllAsync(F.asList("key" + rnd1, "key" + rnd2)).get(); - - assert map.size() == (rnd1 != rnd2 ? 2 : 1); - assert map.get("key" + rnd1) == rnd1; - assert map.get("key" + rnd2) == rnd2; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemove() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd1 = random(); - int rnd2 = random(); - - assert cache.remove("wrongKey") == null; - assert !cache.remove("key" + rnd1, -1); - - assert cache.peek("key" + rnd1) == null || cache.peek("key" + rnd1) == rnd1; - assert cache.peek("key" + rnd2) == null || cache.peek("key" + rnd2) == rnd2; - - assert cache.peek("key" + rnd1) == null || cache.remove("key" + rnd1) == rnd1; - assert cache.peek("key" + rnd2) == null || cache.remove("key" + rnd2, rnd2); - - assert cache.peek("key" + rnd1) == null; - assert cache.peek("key" + rnd2) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemoveAsync() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd1 = random(); - int rnd2 = random(); - - assert cache.removeAsync("wrongKey").get() == null; - assert !cache.removeAsync("key" + rnd1, -1).get(); - - assert cache.peek("key" + rnd1) == null || cache.peek("key" + rnd1) == rnd1; - assert cache.peek("key" + rnd2) == null || cache.peek("key" + rnd2) == rnd2; - - assert cache.peek("key" + rnd1) == null || cache.removeAsync("key" + rnd1).get() == rnd1; - assert cache.peek("key" + rnd2) == null || cache.removeAsync("key" + rnd2, rnd2).get(); - - assert cache.peek("key" + rnd1) == null; - assert cache.peek("key" + rnd2) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemoveAll() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd = random(); - - cache.removeAll(rangeKeys(0, rnd)); - - for (int i = 0; i < rnd; i++) - assert cache.peek("key" + i) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemoveAllFiltered() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - final int rnd = random(); - - cache.removeAll(new P1<GridCacheEntry<String, Integer>>() { - @Override public boolean apply(GridCacheEntry<String, Integer> e) { - Integer val = e.peek(); - - return val != null && val < rnd; - } - }); - - for (int i = 0; i < rnd; i++) - assert cache.peek("key" + i) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemoveAllAsync() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - int rnd = random(); - - cache.removeAllAsync(rangeKeys(0, rnd)).get(); - - for (int i = 0; i < rnd; i++) - assert cache.peek("key" + i) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ - public void testRemoveAllAsyncFiltered() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - final int rnd = random(); - - cache.removeAllAsync(new P1<GridCacheEntry<String, Integer>>() { - @Override public boolean apply(GridCacheEntry<String, Integer> e) { - Integer val = e.peek(); - - return val != null && val < rnd; - } - }).get(); - - for (int i = 0; i < rnd; i++) - assert cache.peek("key" + i) == null; - } - }); - } -}