# ignite-63

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/968c3cf8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/968c3cf8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/968c3cf8

Branch: refs/heads/ignite-63
Commit: 968c3cf87c0bb3a2dab2a3c7474d4201b51d87cc
Parents: a916db6
Author: sboikov <sboi...@gridgain.com>
Authored: Fri Jan 23 12:32:14 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Fri Jan 23 12:32:24 2015 +0300

----------------------------------------------------------------------
 .../GridCacheLoadOnlyStoreAdapterSelfTest.java  |    3 +-
 .../internal/GridCacheProjectionRemoveTest.java |    2 +-
 ...ridCacheAbstractByteArrayValuesSelfTest.java |   83 +
 .../GridCacheAbstractFailoverSelfTest.java      |  431 ++
 .../cache/GridCacheAbstractFlagsTest.java       |   98 +
 ...cheAbstractFullApiMultithreadedSelfTest.java |  402 ++
 .../cache/GridCacheAbstractFullApiSelfTest.java | 5090 +++++++++++++++++
 .../GridCacheAbstractIteratorsSelfTest.java     |  349 ++
 .../cache/GridCacheAbstractMetricsSelfTest.java |  218 +
 .../GridCacheAbstractProjectionSelfTest.java    |  834 +++
 .../GridCacheAbstractRemoveFailureTest.java     |  322 ++
 .../cache/GridCacheAbstractSelfTest.java        |  604 +++
 .../cache/GridCacheAbstractTxReadTest.java      |  137 +
 .../cache/GridCacheAffinityApiSelfTest.java     |  361 ++
 .../cache/GridCacheAffinityMapperSelfTest.java  |  133 +
 .../cache/GridCacheAffinityRoutingSelfTest.java |  689 +++
 .../cache/GridCacheAlwaysEvictionPolicy.java    |   34 +
 .../GridCacheAsyncOperationsLimitSelfTest.java  |   76 +
 .../GridCacheAtomicMessageCountSelfTest.java    |  233 +
 .../cache/GridCacheBasicApiAbstractTest.java    |  663 +++
 .../cache/GridCacheBasicStoreAbstractTest.java  |  589 ++
 ...acheBasicStoreMultithreadedAbstractTest.java |  132 +
 .../cache/GridCacheClearAllSelfTest.java        |  335 ++
 ...dCacheColocatedTxStoreExceptionSelfTest.java |   38 +
 .../cache/GridCacheConcurrentMapTest.java       |  137 +
 .../GridCacheConcurrentTxMultiNodeTest.java     |  857 +++
 ...idCacheConfigurationConsistencySelfTest.java | 1074 ++++
 ...ridCacheConfigurationValidationSelfTest.java |  197 +
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  189 +
 .../GridCacheDeploymentOffHeapSelfTest.java     |   42 +
 .../cache/GridCacheDeploymentSelfTest.java      |  485 ++
 .../cache/GridCacheEntryVersionSelfTest.java    |  159 +
 .../GridCacheEvictionEventAbstractTest.java     |  121 +
 .../GridCacheExAbstractFullApiSelfTest.java     |  103 +
 .../GridCacheFieldsQueryNoDataSelfTest.java     |   82 +
 .../GridCacheFinishPartitionsSelfTest.java      |  312 ++
 ...CacheFullTextQueryMultithreadedSelfTest.java |  156 +
 .../cache/GridCacheGenericTestStore.java        |  274 +
 ...idCacheGetAndTransformStoreAbstractTest.java |  176 +
 .../cache/GridCacheGlobalClearAllSelfTest.java  |  167 +
 .../GridCacheGroupLockAbstractSelfTest.java     | 1328 +++++
 ...heGroupLockFailoverOptimisticTxSelfTest.java |   28 +
 .../GridCacheGroupLockFailoverSelfTest.java     |  532 ++
 ...CacheGroupLockMultiNodeAbstractSelfTest.java |   28 +
 .../cache/GridCacheGroupLockPutTask.java        |  157 +
 .../cache/GridCacheIncrementTransformTest.java  |  233 +
 .../GridCacheInterceptorAbstractSelfTest.java   | 1648 ++++++
 ...cheInterceptorAtomicNearEnabledSelfTest.java |   32 +
 ...erceptorAtomicPrimaryWriteOrderSelfTest.java |   45 +
 ...omicReplicatedPrimaryWriteOrderSelfTest.java |   46 +
 ...acheInterceptorAtomicReplicatedSelfTest.java |   45 +
 .../GridCacheInterceptorAtomicSelfTest.java     |   45 +
 ...ceptorAtomicWithStoreReplicatedSelfTest.java |   31 +
 ...CacheInterceptorAtomicWithStoreSelfTest.java |   30 +
 ...GridCacheInterceptorLocalAtomicSelfTest.java |   50 +
 ...InterceptorLocalAtomicWithStoreSelfTest.java |   30 +
 .../GridCacheInterceptorLocalSelfTest.java      |   44 +
 ...dCacheInterceptorLocalWithStoreSelfTest.java |   30 +
 ...GridCacheInterceptorNearEnabledSelfTest.java |   30 +
 .../GridCacheInterceptorReplicatedSelfTest.java |   39 +
 ...eInterceptorReplicatedWithStoreSelfTest.java |   30 +
 .../cache/GridCacheInterceptorSelfTest.java     |   39 +
 .../GridCacheInterceptorSelfTestSuite.java      |   56 +
 .../GridCacheInterceptorWithStoreSelfTest.java  |   30 +
 .../cache/GridCacheIteratorPerformanceTest.java |  277 +
 .../GridCacheKeyCheckNearEnabledSelfTest.java   |   30 +
 .../cache/GridCacheKeyCheckSelfTest.java        |  205 +
 .../processors/cache/GridCacheLeakTest.java     |  151 +
 .../cache/GridCacheLifecycleAwareSelfTest.java  |  367 ++
 .../GridCacheLocalTxStoreExceptionSelfTest.java |   37 +
 .../cache/GridCacheLuceneQueryIndexTest.java    |  465 ++
 .../GridCacheMarshallerTxAbstractTest.java      |  132 +
 .../cache/GridCacheMemoryModeSelfTest.java      |  268 +
 .../GridCacheMissingCommitVersionSelfTest.java  |  127 +
 ...GridCacheMixedPartitionExchangeSelfTest.java |  153 +
 .../cache/GridCacheMultiUpdateLockSelfTest.java |  204 +
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |  134 +
 ...ultinodeUpdateAtomicNearEnabledSelfTest.java |   39 +
 .../GridCacheMultinodeUpdateAtomicSelfTest.java |   38 +
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |   39 +
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |   40 +
 .../cache/GridCacheMultinodeUpdateSelfTest.java |   39 +
 .../cache/GridCacheMvccManagerSelfTest.java     |  116 +
 .../cache/GridCacheMvccPartitionedSelfTest.java |  688 +++
 .../processors/cache/GridCacheMvccSelfTest.java | 1851 +++++++
 .../GridCacheNearTxStoreExceptionSelfTest.java  |   32 +
 .../cache/GridCacheNestedTxAbstractTest.java    |  280 +
 .../cache/GridCacheObjectToStringSelfTest.java  |  194 +
 ...ffHeapAtomicMultiThreadedUpdateSelfTest.java |   33 +
 ...HeapMultiThreadedUpdateAbstractSelfTest.java |  398 ++
 ...CacheOffHeapMultiThreadedUpdateSelfTest.java |  270 +
 .../cache/GridCacheOffHeapSelfTest.java         |  654 +++
 .../processors/cache/GridCacheOffHeapTest.java  |  257 +
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  682 +++
 .../GridCacheOffHeapTieredAtomicSelfTest.java   |   32 +
 ...heOffHeapTieredEvictionAbstractSelfTest.java |  422 ++
 ...acheOffHeapTieredEvictionAtomicSelfTest.java |   32 +
 .../GridCacheOffHeapTieredEvictionSelfTest.java |   33 +
 .../cache/GridCacheOffHeapTieredSelfTest.java   |   33 +
 .../cache/GridCacheOffheapUpdateSelfTest.java   |  139 +
 .../GridCacheOrderedPreloadingSelfTest.java     |  157 +
 .../cache/GridCacheP2PUndeploySelfTest.java     |  305 ++
 .../GridCachePartitionedAffinitySpreadTest.java |  167 +
 .../cache/GridCachePartitionedGetSelfTest.java  |  252 +
 ...hePartitionedProjectionAffinitySelfTest.java |  118 +
 .../cache/GridCachePartitionedWritesTest.java   |  149 +
 .../GridCachePreloadingEvictionsSelfTest.java   |  262 +
 .../cache/GridCachePutAllFailoverSelfTest.java  |  707 +++
 .../processors/cache/GridCachePutAllTask.java   |  132 +
 .../cache/GridCacheQueryEmbeddedValue.java      |   49 +
 .../cache/GridCacheQueryIndexSelfTest.java      |  124 +
 .../GridCacheQueryIndexingDisabledSelfTest.java |   98 +
 .../GridCacheQueryInternalKeysSelfTest.java     |  112 +
 .../GridCacheReferenceCleanupSelfTest.java      |  502 ++
 .../cache/GridCacheReloadSelfTest.java          |  178 +
 ...ridCacheReplicatedSynchronousCommitTest.java |  202 +
 ...CacheReplicatedTxStoreExceptionSelfTest.java |   38 +
 .../GridCacheReturnValueTransferSelfTest.java   |  207 +
 .../cache/GridCacheSlowTxWarnTest.java          |  148 +
 .../processors/cache/GridCacheStopSelfTest.java |  201 +
 .../cache/GridCacheStorePutxSelfTest.java       |  159 +
 .../cache/GridCacheStoreValueBytesSelfTest.java |  112 +
 .../cache/GridCacheSwapPreloadSelfTest.java     |  223 +
 .../cache/GridCacheSwapReloadSelfTest.java      |  240 +
 .../processors/cache/GridCacheTestKey.java      |   64 +
 .../processors/cache/GridCacheTestStore.java    |  334 ++
 .../processors/cache/GridCacheTestValue.java    |   77 +
 .../processors/cache/GridCacheTestValue2.java   |   67 +
 ...cheTransactionalAbstractMetricsSelfTest.java |  280 +
 .../cache/GridCacheTtlManagerLoadTest.java      |   85 +
 .../cache/GridCacheTtlManagerSelfTest.java      |  120 +
 .../cache/GridCacheUtilsSelfTest.java           |  261 +
 .../GridCacheValueBytesPreloadingSelfTest.java  |  151 +
 ...idCacheValueConsistencyAbstractSelfTest.java |  322 ++
 ...istencyTransactionalNearEnabledSelfTest.java |   31 +
 ...heValueConsistencyTransactionalSelfTest.java |   37 +
 .../GridCacheVariableTopologySelfTest.java      |  191 +
 .../cache/GridCacheVersionSelfTest.java         |   81 +
 ...idCacheWriteBehindStoreAbstractSelfTest.java |    2 -
 .../GridCacheWriteBehindStoreAbstractTest.java  |  358 ++
 .../GridCacheWriteBehindStoreLocalTest.java     |   30 +
 ...heWriteBehindStoreMultithreadedSelfTest.java |  164 +
 ...BehindStorePartitionedMultiNodeSelfTest.java |  216 +
 ...ridCacheWriteBehindStorePartitionedTest.java |   30 +
 ...GridCacheWriteBehindStoreReplicatedTest.java |   30 +
 .../GridCacheWriteBehindStoreSelfTest.java      |  267 +
 .../processors/cache/IgniteTxAbstractTest.java  |  492 ++
 .../IgniteTxConcurrentGetAbstractTest.java      |  143 +
 .../IgniteTxExceptionAbstractSelfTest.java      |  647 +++
 .../cache/IgniteTxMultiNodeAbstractTest.java    |  927 ++++
 .../IgniteTxMultiThreadedAbstractTest.java      |  283 +
 .../cache/IgniteTxReentryAbstractSelfTest.java  |  177 +
 .../IgniteTxSingleThreadedAbstractTest.java     |  137 +
 .../IgniteTxStoreExceptionAbstractSelfTest.java |  657 +++
 ...eAbstractDataStructuresFailoverSelfTest.java |    2 +-
 ...actQueueFailoverDataConsistencySelfTest.java |    1 -
 .../GridCacheQueueCleanupSelfTest.java          |    1 -
 .../GridCacheSetAbstractSelfTest.java           |    1 -
 .../GridCacheSetFailoverAbstractSelfTest.java   |    1 -
 ...tractDistributedByteArrayValuesSelfTest.java |    2 +-
 .../GridCacheClientModesAbstractSelfTest.java   |    2 +-
 .../GridCacheEntrySetAbstractSelfTest.java      |    2 +-
 ...acheEntrySetIterationPreloadingSelfTest.java |    2 +-
 .../distributed/GridCacheEventAbstractTest.java |    2 +-
 ...heExpiredEntriesPreloadAbstractSelfTest.java |    1 -
 ...xOriginatingNodeFailureAbstractSelfTest.java |    1 -
 ...cOriginatingNodeFailureAbstractSelfTest.java |    1 -
 .../IgniteTxPreloadAbstractTest.java            |    2 +-
 ...heAbstractTransformWriteThroughSelfTest.java |    2 +-
 .../dht/GridCacheColocatedDebugTest.java        |    1 -
 .../dht/GridCacheColocatedFailoverSelfTest.java |    2 +-
 .../GridCacheColocatedTxExceptionSelfTest.java  |    2 +-
 ...dCacheColocatedTxSingleThreadedSelfTest.java |    1 -
 .../GridCacheDaemonNodePartitionedSelfTest.java |    2 +-
 .../GridCacheDhtAtomicRemoveFailureTest.java    |    2 +-
 .../dht/GridCacheDhtInternalEntrySelfTest.java  |    2 +-
 .../dht/GridCacheDhtRemoveFailureTest.java      |    2 +-
 .../GridCacheExColocatedFullApiSelfTest.java    |    2 +-
 .../GridCacheGroupLockColocatedSelfTest.java    |    2 +-
 ...cheGroupLockPartitionedAbstractSelfTest.java |    2 +-
 ...ePartitionedNearDisabledMetricsSelfTest.java |    2 +-
 .../dht/IgniteTxReentryColocatedSelfTest.java   |    2 +-
 ...GridCacheValueConsistencyAtomicSelfTest.java |    1 -
 ...ridCacheAtomicNearEvictionEventSelfTest.java |    2 +-
 .../GridCacheAtomicNearRemoveFailureTest.java   |    2 +-
 ...idCacheAtomicPartitionedMetricsSelfTest.java |    2 +-
 ...cPrimaryWriteOrderNearRemoveFailureTest.java |    2 +-
 .../near/GridCacheExNearFullApiSelfTest.java    |    2 +-
 .../near/GridCacheGroupLockNearSelfTest.java    |    2 +-
 .../GridCacheNearEvictionEventSelfTest.java     |    2 +-
 .../near/GridCacheNearMetricsSelfTest.java      |    2 +-
 .../GridCacheNearPartitionedClearSelfTest.java  |    2 +-
 .../near/GridCacheNearRemoveFailureTest.java    |    2 +-
 .../near/GridCacheNearTxExceptionSelfTest.java  |    2 +-
 .../near/GridCachePartitionedBasicApiTest.java  |    2 +-
 ...ePartitionedBasicStoreMultiNodeSelfTest.java |    2 +-
 .../GridCachePartitionedBasicStoreSelfTest.java |    2 +-
 .../GridCachePartitionedEntryLockSelfTest.java  |    2 +-
 .../GridCachePartitionedEvictionSelfTest.java   |    2 +-
 .../GridCachePartitionedFailoverSelfTest.java   |    2 +-
 .../near/GridCachePartitionedFlagsTest.java     |    2 +-
 ...PartitionedFullApiMultithreadedSelfTest.java |    2 +-
 .../GridCachePartitionedFullApiSelfTest.java    |    1 -
 ...PartitionedGetAndTransformStoreSelfTest.java |    2 +-
 .../GridCachePartitionedIteratorsSelfTest.java  |    2 +-
 .../GridCachePartitionedMetricsSelfTest.java    |    2 +-
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    2 +-
 .../near/GridCachePartitionedNestedTxTest.java  |    2 +-
 .../GridCachePartitionedProjectionSelfTest.java |    2 +-
 ...GridCachePartitionedTxConcurrentGetTest.java |    2 +-
 ...GridCachePartitionedTxMultiNodeSelfTest.java |    2 +-
 ...CachePartitionedTxMultiThreadedSelfTest.java |    1 -
 .../near/GridCachePartitionedTxReadTest.java    |    2 +-
 ...achePartitionedTxSingleThreadedSelfTest.java |    1 -
 .../near/GridCachePutArrayValueSelfTest.java    |    1 -
 .../near/IgniteTxReentryNearSelfTest.java       |    2 +-
 ...ridCacheAtomicReplicatedMetricsSelfTest.java |    2 +-
 .../GridCacheDaemonNodeReplicatedSelfTest.java  |    2 +-
 .../GridCacheExReplicatedFullApiSelfTest.java   |    2 +-
 ...cheGroupLockMultiNodeReplicatedSelfTest.java |    2 +-
 .../GridCacheGroupLockReplicatedSelfTest.java   |    2 +-
 .../GridCacheReplicatedBasicApiTest.java        |    2 +-
 .../GridCacheReplicatedBasicStoreSelfTest.java  |    2 +-
 ...ridCacheReplicatedEvictionEventSelfTest.java |    2 +-
 .../GridCacheReplicatedEvictionSelfTest.java    |    2 +-
 .../GridCacheReplicatedFailoverSelfTest.java    |    2 +-
 .../GridCacheReplicatedFlagsTest.java           |    2 +-
 ...eReplicatedFullApiMultithreadedSelfTest.java |    2 +-
 ...ReplicatedFullApiMultithreadedSelfTest1.java |    2 +-
 .../GridCacheReplicatedFullApiSelfTest.java     |    2 +-
 ...eReplicatedGetAndTransformStoreSelfTest.java |    2 +-
 .../GridCacheReplicatedIteratorsSelfTest.java   |    2 +-
 .../GridCacheReplicatedMarshallerTxTest.java    |    2 +-
 .../GridCacheReplicatedMetricsSelfTest.java     |    2 +-
 .../GridCacheReplicatedProjectionSelfTest.java  |    2 +-
 .../GridCacheReplicatedTxConcurrentGetTest.java |    2 +-
 .../GridCacheReplicatedTxExceptionSelfTest.java |    2 +-
 ...GridCacheReplicatedTxMultiNodeBasicTest.java |    2 +-
 ...dCacheReplicatedTxMultiThreadedSelfTest.java |    1 -
 .../GridCacheReplicatedTxReadTest.java          |    2 +-
 ...CacheReplicatedTxSingleThreadedSelfTest.java |    1 -
 .../GridCacheBatchEvictUnswapSelfTest.java      |    2 +-
 .../GridCacheEvictionTouchSelfTest.java         |    2 +-
 ...cheSynchronousEvictionsFailoverSelfTest.java |    2 +-
 .../GridCacheAtomicLocalMetricsSelfTest.java    |    2 +-
 .../local/GridCacheDaemonNodeLocalSelfTest.java |    2 +-
 .../local/GridCacheExLocalFullApiSelfTest.java  |    2 +-
 .../local/GridCacheLocalBasicApiSelfTest.java   |    2 +-
 ...cheLocalBasicStoreMultithreadedSelfTest.java |    2 +-
 .../local/GridCacheLocalBasicStoreSelfTest.java |    2 +-
 .../GridCacheLocalByteArrayValuesSelfTest.java  |    2 +-
 .../GridCacheLocalEvictionEventSelfTest.java    |    2 +-
 ...dCacheLocalFullApiMultithreadedSelfTest.java |    2 +-
 .../local/GridCacheLocalFullApiSelfTest.java    |    2 +-
 ...dCacheLocalGetAndTransformStoreSelfTest.java |    2 +-
 .../local/GridCacheLocalIteratorsSelfTest.java  |    2 +-
 .../local/GridCacheLocalMetricsSelfTest.java    |    2 +-
 .../local/GridCacheLocalProjectionSelfTest.java |    2 +-
 .../GridCacheLocalTxExceptionSelfTest.java      |    2 +-
 .../GridCacheLocalTxMultiThreadedSelfTest.java  |    1 -
 .../cache/local/GridCacheLocalTxReadTest.java   |    2 +-
 .../GridCacheLocalTxSingleThreadedSelfTest.java |    1 -
 .../GridCacheStoreValueBytesNode.java           |    2 +-
 .../GridCacheEvictionSelfTestSuite.java         |    2 +-
 .../GridCacheWriteBehindTestSuite.java          |    1 -
 .../testsuites/GridUtilSelfTestSuite.java       |    2 +-
 .../bamboo/GridDataGridRestartTestSuite.java    |    2 +-
 .../bamboo/GridDataGridTestSuite.java           |    1 -
 ...ridCacheAbstractByteArrayValuesSelfTest.java |   83 -
 .../GridCacheAbstractFailoverSelfTest.java      |  431 --
 .../cache/GridCacheAbstractFlagsTest.java       |   99 -
 ...cheAbstractFullApiMultithreadedSelfTest.java |  402 --
 .../cache/GridCacheAbstractFullApiSelfTest.java | 5091 ------------------
 .../GridCacheAbstractIteratorsSelfTest.java     |  349 --
 .../cache/GridCacheAbstractMetricsSelfTest.java |  218 -
 .../GridCacheAbstractProjectionSelfTest.java    |  835 ---
 .../GridCacheAbstractRemoveFailureTest.java     |  322 --
 .../cache/GridCacheAbstractSelfTest.java        |  604 ---
 .../cache/GridCacheAbstractTxReadTest.java      |  138 -
 .../cache/GridCacheAffinityApiSelfTest.java     |  361 --
 .../cache/GridCacheAffinityMapperSelfTest.java  |  133 -
 .../cache/GridCacheAffinityRoutingSelfTest.java |  689 ---
 .../cache/GridCacheAlwaysEvictionPolicy.java    |   34 -
 .../GridCacheAsyncOperationsLimitSelfTest.java  |   76 -
 .../GridCacheAtomicMessageCountSelfTest.java    |  233 -
 .../cache/GridCacheBasicApiAbstractTest.java    |  663 ---
 .../cache/GridCacheBasicStoreAbstractTest.java  |  590 --
 ...acheBasicStoreMultithreadedAbstractTest.java |  132 -
 .../cache/GridCacheClearAllSelfTest.java        |  335 --
 ...dCacheColocatedTxStoreExceptionSelfTest.java |   38 -
 .../cache/GridCacheConcurrentMapTest.java       |  137 -
 .../GridCacheConcurrentTxMultiNodeTest.java     |  857 ---
 ...idCacheConfigurationConsistencySelfTest.java | 1074 ----
 ...ridCacheConfigurationValidationSelfTest.java |  197 -
 .../GridCacheDaemonNodeAbstractSelfTest.java    |  189 -
 .../GridCacheDeploymentOffHeapSelfTest.java     |   42 -
 .../cache/GridCacheDeploymentSelfTest.java      |  485 --
 .../cache/GridCacheEntryVersionSelfTest.java    |  159 -
 .../GridCacheEvictionEventAbstractTest.java     |  121 -
 .../GridCacheExAbstractFullApiSelfTest.java     |  104 -
 .../GridCacheFieldsQueryNoDataSelfTest.java     |   82 -
 .../GridCacheFinishPartitionsSelfTest.java      |  313 --
 ...CacheFullTextQueryMultithreadedSelfTest.java |  156 -
 .../cache/GridCacheGenericTestStore.java        |  274 -
 ...idCacheGetAndTransformStoreAbstractTest.java |  176 -
 .../cache/GridCacheGlobalClearAllSelfTest.java  |  167 -
 .../GridCacheGroupLockAbstractSelfTest.java     | 1328 -----
 ...heGroupLockFailoverOptimisticTxSelfTest.java |   28 -
 .../GridCacheGroupLockFailoverSelfTest.java     |  532 --
 ...CacheGroupLockMultiNodeAbstractSelfTest.java |   28 -
 .../cache/GridCacheGroupLockPutTask.java        |  157 -
 .../cache/GridCacheIncrementTransformTest.java  |  233 -
 .../GridCacheInterceptorAbstractSelfTest.java   | 1648 ------
 ...cheInterceptorAtomicNearEnabledSelfTest.java |   32 -
 ...erceptorAtomicPrimaryWriteOrderSelfTest.java |   45 -
 ...omicReplicatedPrimaryWriteOrderSelfTest.java |   46 -
 ...acheInterceptorAtomicReplicatedSelfTest.java |   45 -
 .../GridCacheInterceptorAtomicSelfTest.java     |   45 -
 ...ceptorAtomicWithStoreReplicatedSelfTest.java |   31 -
 ...CacheInterceptorAtomicWithStoreSelfTest.java |   30 -
 ...GridCacheInterceptorLocalAtomicSelfTest.java |   50 -
 ...InterceptorLocalAtomicWithStoreSelfTest.java |   30 -
 .../GridCacheInterceptorLocalSelfTest.java      |   44 -
 ...dCacheInterceptorLocalWithStoreSelfTest.java |   30 -
 ...GridCacheInterceptorNearEnabledSelfTest.java |   30 -
 .../GridCacheInterceptorReplicatedSelfTest.java |   39 -
 ...eInterceptorReplicatedWithStoreSelfTest.java |   30 -
 .../cache/GridCacheInterceptorSelfTest.java     |   39 -
 .../GridCacheInterceptorSelfTestSuite.java      |   56 -
 .../GridCacheInterceptorWithStoreSelfTest.java  |   30 -
 .../cache/GridCacheIteratorPerformanceTest.java |  277 -
 .../GridCacheKeyCheckNearEnabledSelfTest.java   |   30 -
 .../cache/GridCacheKeyCheckSelfTest.java        |  205 -
 .../processors/cache/GridCacheLeakTest.java     |  151 -
 .../cache/GridCacheLifecycleAwareSelfTest.java  |  367 --
 .../GridCacheLocalTxStoreExceptionSelfTest.java |   37 -
 .../cache/GridCacheLuceneQueryIndexTest.java    |  465 --
 .../GridCacheMarshallerTxAbstractTest.java      |  132 -
 .../cache/GridCacheMemoryModeSelfTest.java      |  268 -
 .../GridCacheMissingCommitVersionSelfTest.java  |  127 -
 ...GridCacheMixedPartitionExchangeSelfTest.java |  153 -
 .../cache/GridCacheMultiUpdateLockSelfTest.java |  204 -
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |  134 -
 ...ultinodeUpdateAtomicNearEnabledSelfTest.java |   39 -
 .../GridCacheMultinodeUpdateAtomicSelfTest.java |   38 -
 ...inodeUpdateNearEnabledNoBackupsSelfTest.java |   39 -
 ...CacheMultinodeUpdateNearEnabledSelfTest.java |   40 -
 .../cache/GridCacheMultinodeUpdateSelfTest.java |   39 -
 .../cache/GridCacheMvccManagerSelfTest.java     |  116 -
 .../cache/GridCacheMvccPartitionedSelfTest.java |  688 ---
 .../processors/cache/GridCacheMvccSelfTest.java | 1851 -------
 .../GridCacheNearTxStoreExceptionSelfTest.java  |   32 -
 .../cache/GridCacheNestedTxAbstractTest.java    |  280 -
 .../cache/GridCacheObjectToStringSelfTest.java  |  194 -
 ...ffHeapAtomicMultiThreadedUpdateSelfTest.java |   33 -
 ...HeapMultiThreadedUpdateAbstractSelfTest.java |  398 --
 ...CacheOffHeapMultiThreadedUpdateSelfTest.java |  270 -
 .../cache/GridCacheOffHeapSelfTest.java         |  654 ---
 .../processors/cache/GridCacheOffHeapTest.java  |  257 -
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  683 ---
 .../GridCacheOffHeapTieredAtomicSelfTest.java   |   32 -
 ...heOffHeapTieredEvictionAbstractSelfTest.java |  422 --
 ...acheOffHeapTieredEvictionAtomicSelfTest.java |   32 -
 .../GridCacheOffHeapTieredEvictionSelfTest.java |   33 -
 .../cache/GridCacheOffHeapTieredSelfTest.java   |   33 -
 .../cache/GridCacheOffheapUpdateSelfTest.java   |  139 -
 .../GridCacheOrderedPreloadingSelfTest.java     |  157 -
 .../cache/GridCacheP2PUndeploySelfTest.java     |  306 --
 .../GridCachePartitionedAffinitySpreadTest.java |  167 -
 .../cache/GridCachePartitionedGetSelfTest.java  |  252 -
 ...hePartitionedProjectionAffinitySelfTest.java |  118 -
 .../cache/GridCachePartitionedWritesTest.java   |  149 -
 .../GridCachePreloadingEvictionsSelfTest.java   |  262 -
 .../cache/GridCachePutAllFailoverSelfTest.java  |  707 ---
 .../processors/cache/GridCachePutAllTask.java   |  132 -
 .../cache/GridCacheQueryEmbeddedValue.java      |   49 -
 .../cache/GridCacheQueryIndexSelfTest.java      |  124 -
 .../GridCacheQueryIndexingDisabledSelfTest.java |   98 -
 .../GridCacheQueryInternalKeysSelfTest.java     |  112 -
 .../GridCacheReferenceCleanupSelfTest.java      |  502 --
 .../cache/GridCacheReloadSelfTest.java          |  178 -
 ...ridCacheReplicatedSynchronousCommitTest.java |  202 -
 ...CacheReplicatedTxStoreExceptionSelfTest.java |   38 -
 .../GridCacheReturnValueTransferSelfTest.java   |  207 -
 .../cache/GridCacheSlowTxWarnTest.java          |  148 -
 .../processors/cache/GridCacheStopSelfTest.java |  201 -
 .../cache/GridCacheStorePutxSelfTest.java       |  159 -
 .../cache/GridCacheStoreValueBytesSelfTest.java |  112 -
 .../cache/GridCacheSwapPreloadSelfTest.java     |  223 -
 .../cache/GridCacheSwapReloadSelfTest.java      |  240 -
 .../processors/cache/GridCacheTestKey.java      |   64 -
 .../processors/cache/GridCacheTestStore.java    |  334 --
 .../processors/cache/GridCacheTestValue.java    |   77 -
 .../processors/cache/GridCacheTestValue2.java   |   67 -
 ...cheTransactionalAbstractMetricsSelfTest.java |  280 -
 .../cache/GridCacheTtlManagerLoadTest.java      |   86 -
 .../cache/GridCacheTtlManagerSelfTest.java      |  120 -
 .../cache/GridCacheUtilsSelfTest.java           |  261 -
 .../GridCacheValueBytesPreloadingSelfTest.java  |  151 -
 ...idCacheValueConsistencyAbstractSelfTest.java |  323 --
 ...istencyTransactionalNearEnabledSelfTest.java |   31 -
 ...heValueConsistencyTransactionalSelfTest.java |   37 -
 .../GridCacheVariableTopologySelfTest.java      |  191 -
 .../cache/GridCacheVersionSelfTest.java         |   81 -
 .../GridCacheWriteBehindStoreAbstractTest.java  |  358 --
 .../GridCacheWriteBehindStoreLocalTest.java     |   31 -
 ...heWriteBehindStoreMultithreadedSelfTest.java |  164 -
 ...BehindStorePartitionedMultiNodeSelfTest.java |  216 -
 ...ridCacheWriteBehindStorePartitionedTest.java |   31 -
 ...GridCacheWriteBehindStoreReplicatedTest.java |   31 -
 .../GridCacheWriteBehindStoreSelfTest.java      |  268 -
 .../processors/cache/IgniteTxAbstractTest.java  |  492 --
 .../IgniteTxConcurrentGetAbstractTest.java      |  143 -
 .../IgniteTxExceptionAbstractSelfTest.java      |  648 ---
 .../cache/IgniteTxMultiNodeAbstractTest.java    |  927 ----
 .../IgniteTxMultiThreadedAbstractTest.java      |  283 -
 .../cache/IgniteTxReentryAbstractSelfTest.java  |  177 -
 .../IgniteTxSingleThreadedAbstractTest.java     |  137 -
 .../IgniteTxStoreExceptionAbstractSelfTest.java |  658 ---
 .../cache/GridCacheQueryTestValue.java          |    1 -
 ...idCacheReduceQueryMultithreadedSelfTest.java |    1 -
 .../near/GridCacheQueryNodeRestartSelfTest.java |    2 +-
 .../query/h2/GridH2IndexRebuildTest.java        |    2 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |    2 +-
 .../testsuites/GridCacheQuerySelfTestSuite.java |    1 -
 .../bamboo/GridH2IndexingSpiTestSuite.java      |    1 -
 .../processors/cache/GridCacheJtaSelfTest.java  |    1 -
 427 files changed, 41479 insertions(+), 41524 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
index 55ae391..5b7c488 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
@@ -18,9 +18,8 @@
 package org.apache.ignite.cache.store;
 
 import org.apache.ignite.cache.*;
-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.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/GridCacheProjectionRemoveTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/GridCacheProjectionRemoveTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheProjectionRemoveTest.java
index 0d46dc2..061313a 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/GridCacheProjectionRemoveTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/GridCacheProjectionRemoveTest.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.internal;
 
 import org.apache.ignite.*;
-import org.gridgain.grid.kernal.processors.cache.*;
+import org.apache.ignite.internal.processors.cache.*;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/968c3cf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
new file mode 100644
index 0000000..18e7ca4
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.apache.ignite.internal.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/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
new file mode 100644
index 0000000..7793062
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
@@ -0,0 +1,431 @@
+/*
+ * 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.apache.ignite.internal.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/apache/ignite/internal/processors/cache/GridCacheAbstractFlagsTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFlagsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFlagsTest.java
new file mode 100644
index 0000000..a293b64
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFlagsTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.apache.ignite.internal.processors.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/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
new file mode 100644
index 0000000..4ff49d7
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -0,0 +1,402 @@
+/*
+ * 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.apache.ignite.internal.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;
+            }
+        });
+    }
+}

Reply via email to