IGNITE-10410: MVCC: Create "Cache 7" test suite for MVCC mode. This closes #5549.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9edd7861 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9edd7861 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9edd7861 Branch: refs/heads/ignite-10044 Commit: 9edd7861f6e08a27966d68f9b1400a8cf873c137 Parents: cf32fc7 Author: rkondakov <kondako...@mail.ru> Authored: Wed Dec 5 16:11:45 2018 +0300 Committer: Igor Seliverstov <gvvinbl...@gmail.com> Committed: Wed Dec 5 16:11:45 2018 +0300 ---------------------------------------------------------------------- .../cache/CacheGroupMetricsMBeanTest.java | 20 ++++-- .../cache/CacheMetricsManageTest.java | 11 ++- ...ynamicCacheStartFailWithPersistenceTest.java | 4 ++ .../cache/MvccCacheGroupMetricsMBeanTest.java | 29 ++++++++ .../cache/WalModeChangeAbstractSelfTest.java | 3 + .../cache/WalModeChangeAdvancedSelfTest.java | 4 ++ .../CacheDataLossOnPartitionMoveTest.java | 6 +- .../CachePageWriteLockUnlockTest.java | 6 +- ...cheRebalancingPartitionCountersMvccTest.java | 29 ++++++++ ...idCacheRebalancingPartitionCountersTest.java | 9 +++ ...cheRebalancingWithAsyncClearingMvccTest.java | 36 ++++++++++ ...idCacheRebalancingWithAsyncClearingTest.java | 9 +++ .../PageEvictionMultinodeAbstractTest.java | 4 ++ ...tinuousQueryAsyncFailoverMvccTxSelfTest.java | 5 -- ...heContinuousQueryFailoverMvccTxSelfTest.java | 5 -- ...IntegrityWithPrimaryIndexCorruptionTest.java | 9 +++ .../TxRollbackAsyncNearCacheTest.java | 9 +++ .../cache/transactions/TxRollbackAsyncTest.java | 43 +++++++---- ...WithSmallTimeoutAndContentionOneKeyTest.java | 10 +++ .../testsuites/IgniteCacheMvccTestSuite7.java | 76 ++++++++++++++++++++ .../testsuites/IgniteCacheTestSuite4.java | 2 +- .../testsuites/IgniteCacheTestSuite7.java | 56 +++++++-------- .../ignite/testsuites/IgnitePdsTestSuite4.java | 3 + 23 files changed, 324 insertions(+), 64 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java index f8108eb..3cd730f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMBeanTest.java @@ -34,6 +34,7 @@ import javax.management.ObjectName; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; +import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.affinity.AffinityFunction; import org.apache.ignite.cache.affinity.AffinityFunctionContext; @@ -132,21 +133,25 @@ public class CacheGroupMetricsMBeanTest extends GridCommonAbstractTest implement .setGroupName("group1") .setCacheMode(CacheMode.PARTITIONED) .setBackups(3) - .setAffinity(new RoundRobinVariableSizeAffinityFunction()); + .setAffinity(new RoundRobinVariableSizeAffinityFunction()) + .setAtomicityMode(atomicityMode()); CacheConfiguration cCfg2 = new CacheConfiguration() .setName("cache2") .setGroupName("group2") - .setCacheMode(CacheMode.REPLICATED); + .setCacheMode(CacheMode.REPLICATED) + .setAtomicityMode(atomicityMode()); CacheConfiguration cCfg3 = new CacheConfiguration() .setName("cache3") .setGroupName("group2") - .setCacheMode(CacheMode.REPLICATED); + .setCacheMode(CacheMode.REPLICATED) + .setAtomicityMode(atomicityMode()); CacheConfiguration cCfg4 = new CacheConfiguration() .setName("cache4") - .setCacheMode(CacheMode.PARTITIONED); + .setCacheMode(CacheMode.PARTITIONED) + .setAtomicityMode(atomicityMode()); cfg.setCacheConfiguration(cCfg1, cCfg2, cCfg3, cCfg4); @@ -163,6 +168,13 @@ public class CacheGroupMetricsMBeanTest extends GridCommonAbstractTest implement return cfg; } + /** + * @return Cache atomicity mode. + */ + protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.ATOMIC; + } + /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java index ae00ac9..94830be 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheMetricsManageTest.java @@ -52,6 +52,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; /** @@ -80,6 +81,9 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testJmxNoPdsStatisticsEnable() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-9224"); + testJmxStatisticsEnable(false); } @@ -87,6 +91,9 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest { * @throws Exception If failed. */ public void testJmxPdsStatisticsEnable() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + testJmxStatisticsEnable(true); } @@ -101,7 +108,7 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest { .setName(CACHE1) .setGroupName(GROUP) .setCacheMode(CacheMode.PARTITIONED) - .setAtomicityMode(CacheAtomicityMode.ATOMIC); + .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); mgr1.createCache(CACHE1, cfg1); @@ -490,7 +497,7 @@ public class CacheMetricsManageTest extends GridCommonAbstractTest { .setName(CACHE1) .setGroupName(GROUP) .setCacheMode(CacheMode.PARTITIONED) - .setAtomicityMode(CacheAtomicityMode.ATOMIC) + .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cfg.setCacheConfiguration(cacheCfg); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java index 8643b66..4826119 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartFailWithPersistenceTest.java @@ -24,6 +24,7 @@ import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.WALMode; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; +import org.apache.ignite.testframework.MvccFeatureChecker; /** * Tests the recovery after a dynamic cache start failure, with enabled persistence. @@ -57,6 +58,9 @@ public class IgniteDynamicCacheStartFailWithPersistenceTest extends IgniteAbstra /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + cleanPersistenceDir(); startGrids(gridCount()); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java new file mode 100644 index 0000000..2642eb5 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/MvccCacheGroupMetricsMBeanTest.java @@ -0,0 +1,29 @@ +/* + * 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.CacheAtomicityMode; + +/** + * + */ +public class MvccCacheGroupMetricsMBeanTest extends CacheGroupMetricsMBeanTest { + /** {@inheritDoc} */ + @Override protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java index 8c8ce53..467d6ff 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAbstractSelfTest.java @@ -27,6 +27,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.lang.IgniteInClosureX; import org.apache.ignite.internal.util.typedef.internal.U; +import org.apache.ignite.testframework.MvccFeatureChecker; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -187,6 +188,8 @@ public abstract class WalModeChangeAbstractSelfTest extends WalModeChangeCommonA // Doesn't make sense for JDBC. return; + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); + forAllNodes(new IgniteInClosureX<Ignite>() { @Override public void applyx(Ignite ignite) throws IgniteCheckedException { createCache(ignite, cacheConfig(LOCAL).setDataRegionName(REGION_VOLATILE)); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java index 5f2b4aa..f1e6e92 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/WalModeChangeAdvancedSelfTest.java @@ -32,6 +32,7 @@ import org.apache.ignite.internal.IgniteClientReconnectAbstractTest; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; +import org.apache.ignite.testframework.MvccFeatureChecker; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -141,6 +142,9 @@ public class WalModeChangeAdvancedSelfTest extends WalModeChangeCommonAbstractSe * @throws Exception If failed. */ public void testJoin() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + checkJoin(false); } http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java index 9ff0725..acbfa8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheDataLossOnPartitionMoveTest.java @@ -36,13 +36,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.WALMode; import org.apache.ignite.internal.TestRecordingCommunicationSpi; import org.apache.ignite.internal.processors.cache.GridCacheUtils; -import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage; +import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.GridTestNode; +import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; @@ -119,6 +120,9 @@ public class CacheDataLossOnPartitionMoveTest extends GridCommonAbstractTest { * @throws Exception if failed. */ public void testDataLossOnPartitionMove() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + try { Ignite ignite = startGridsMultiThreaded(GRIDS_CNT / 2, false); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java index 41c5882..5b24761 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePageWriteLockUnlockTest.java @@ -21,6 +21,7 @@ import java.util.Iterator; import javax.cache.Cache; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; @@ -51,8 +52,9 @@ public class CachePageWriteLockUnlockTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME). - setAffinity(new RendezvousAffinityFunction(false, 32))); + cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME) + .setAffinity(new RendezvousAffinityFunction(false, 32)) + .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); cfg.setActiveOnStart(false); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java new file mode 100644 index 0000000..4166cfc --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersMvccTest.java @@ -0,0 +1,29 @@ +/* + * 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.distributed.rebalancing; + +import org.apache.ignite.cache.CacheAtomicityMode; + +/** + * + */ +public class GridCacheRebalancingPartitionCountersMvccTest extends GridCacheRebalancingPartitionCountersTest { + /** {@inheritDoc} */ + @Override protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java index 258e36e..6523eb9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; @@ -61,6 +62,7 @@ public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstrac .setMaxSize(100L * 1024 * 1024)) .setWalMode(WALMode.LOG_ONLY)) .setCacheConfiguration(new CacheConfiguration(CACHE_NAME) + .setAtomicityMode(atomicityMode()) .setBackups(2) .setRebalanceBatchSize(4096) // Force to create several supply messages during rebalancing. .setAffinity( @@ -80,6 +82,13 @@ public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstrac } /** + * @return Cache atomicity mode. + */ + protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.ATOMIC; + } + + /** * */ private boolean contains(int[] arr, int a) { http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java new file mode 100644 index 0000000..a61d6d0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingMvccTest.java @@ -0,0 +1,36 @@ +/* + * 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.distributed.rebalancing; + +import org.apache.ignite.cache.CacheAtomicityMode; + +/** + * + */ +public class GridCacheRebalancingWithAsyncClearingMvccTest extends GridCacheRebalancingWithAsyncClearingTest { + /** {@inheritDoc} */ + @Override public void setUp() throws Exception { + fail("https://issues.apache.org/jira/browse/IGNITE-10421"); + + super.setUp(); + } + + /** {@inheritDoc} */ + @Override protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java index 328653d..2b69439 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java @@ -21,6 +21,7 @@ import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.IgniteSystemProperties; +import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.cache.PartitionLossPolicy; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; @@ -65,6 +66,7 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac ); cfg.setCacheConfiguration(new CacheConfiguration<>(CACHE_NAME) + .setAtomicityMode(atomicityMode()) .setBackups(2) .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC) .setIndexedTypes(Integer.class, Integer.class) @@ -94,6 +96,13 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac } /** + * @return Atomicity mode. + */ + protected CacheAtomicityMode atomicityMode() { + return CacheAtomicityMode.ATOMIC; + } + + /** * Test that partition clearing doesn't block partitions map exchange. * * @throws Exception If failed. http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java index 777c2d7..e30f1cf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeAbstractTest.java @@ -25,6 +25,7 @@ import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.testframework.MvccFeatureChecker; /** * @@ -46,6 +47,9 @@ public abstract class PageEvictionMultinodeAbstractTest extends PageEvictionAbst /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10448"); + startGridsMultiThreaded(4, false); clientGrid = startGrid("client"); http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java index 7c15f38..aa60aeb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java @@ -47,11 +47,6 @@ public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest extends CacheConti } /** {@inheritDoc} */ - @Override public void testLeftPrimaryAndBackupNodes() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10047"); - } - - /** {@inheritDoc} */ @Override public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java index 2d578f2..df27087 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java @@ -42,11 +42,6 @@ public class CacheContinuousQueryFailoverMvccTxSelfTest extends CacheContinuousQ } /** {@inheritDoc} */ - @Override public void testLeftPrimaryAndBackupNodes() throws Exception { - fail("https://issues.apache.org/jira/browse/IGNITE-10047"); - } - - /** {@inheritDoc} */ @Override public void testFailoverStartStopBackup() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10391"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java index fd31ee5..616bf97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TransactionIntegrityWithPrimaryIndexCorruptionTest.java @@ -34,6 +34,7 @@ import org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO; import org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler; import org.apache.ignite.internal.processors.cache.tree.SearchRow; import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.MvccFeatureChecker; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -45,6 +46,14 @@ public class TransactionIntegrityWithPrimaryIndexCorruptionTest extends Abstract private static volatile boolean corruptionEnabled; /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10470"); + + super.beforeTest(); + } + + /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { corruptionEnabled = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java index 5caa1a0..dc115e1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncNearCacheTest.java @@ -17,6 +17,8 @@ package org.apache.ignite.internal.processors.cache.transactions; +import org.apache.ignite.testframework.MvccFeatureChecker; + /** * Tests an ability to async rollback near transactions. */ @@ -25,4 +27,11 @@ public class TxRollbackAsyncNearCacheTest extends TxRollbackAsyncTest { @Override protected boolean nearCacheEnabled() { return true; } + + /** {@inheritDoc} */ + @Override public void setUp() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + + super.setUp(); + } } http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java index d2e9804..8076746 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackAsyncTest.java @@ -59,6 +59,7 @@ import org.apache.ignite.internal.TestRecordingCommunicationSpi; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockRequest; +import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxEnlistRequest; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishRequest; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; import org.apache.ignite.internal.util.future.GridFutureAdapter; @@ -99,7 +100,6 @@ import static org.apache.ignite.testframework.GridTestUtils.runAsync; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; -import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK; @@ -127,14 +127,6 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { public static final String LABEL = "wLockTx"; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-10410"); - - super.beforeTestsStarted(); - } - - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -228,6 +220,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { * */ public void testRollbackSimple() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-7952"); + startClient(); for (Ignite ignite : G.allGrids()) { @@ -242,7 +237,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { */ private void testRollbackSimple0(Ignite near) throws Exception { // Normal rollback after put. - Transaction tx = near.transactions().txStart(PESSIMISTIC, READ_COMMITTED); + Transaction tx = near.transactions().txStart(PESSIMISTIC, REPEATABLE_READ); near.cache(CACHE_NAME).put(0, 0); @@ -406,7 +401,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { txReadyFut.onDone(tx); // Will block on lock request until rolled back asynchronously. - Object o = tryLockNode.cache(CACHE_NAME).get(0); + Object o = tryLockNode.cache(CACHE_NAME).getAndPut(0, 0); assertNull(o); // If rolled back by close, previous get will return null. } @@ -496,6 +491,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { * */ public void testEnlistManyReadOptimistic() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + return; // Optimistic transactions are not supported by MVCC. + testEnlistMany(false, SERIALIZABLE, OPTIMISTIC); } @@ -503,6 +501,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { * */ public void testEnlistManyWriteOptimistic() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + return; // Optimistic transactions are not supported by MVCC. + testEnlistMany(true, SERIALIZABLE, OPTIMISTIC); } @@ -547,13 +548,20 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { * Rollback tx while near lock request is delayed. */ public void testRollbackDelayNearLockRequest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-9470"); + final Ignite client = startClient(); final Ignite prim = primaryNode(0, CACHE_NAME); final TestRecordingCommunicationSpi spi = (TestRecordingCommunicationSpi)client.configuration().getCommunicationSpi(); - spi.blockMessages(GridNearLockRequest.class, prim.name()); + boolean mvcc = MvccFeatureChecker.forcedMvcc(); + + Class msgCls = mvcc ? GridNearTxEnlistRequest.class : GridNearLockRequest.class; + + spi.blockMessages(msgCls, prim.name()); final IgniteInternalFuture<Void> rollbackFut = runAsync(new Callable<Void>() { @Override public Void call() throws Exception { @@ -571,7 +579,7 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { fail(); } catch (CacheException e) { - assertTrue(X.hasCause(e, TransactionRollbackException.class)); + assertTrue(X.getFullStackTrace(e),X.hasCause(e, TransactionRollbackException.class)); } rollbackFut.get(); @@ -646,6 +654,9 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { * */ public void testMixedAsyncRollbackTypes() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10434"); + final Ignite client = startClient(); final AtomicBoolean stop = new AtomicBoolean(); @@ -676,6 +687,8 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { for (Ignite ignite : G.allGrids()) perNodeTxs.put(ignite, new ArrayBlockingQueue<>(1000)); + boolean mvcc = MvccFeatureChecker.forcedMvcc(); + IgniteInternalFuture<?> txFut = multithreadedAsync(() -> { while (!stop.get()) { int nodeId = r.nextInt(GRID_CNT + 1); @@ -683,8 +696,8 @@ public class TxRollbackAsyncTest extends GridCommonAbstractTest { // Choose random node to start tx on. Ignite node = nodeId == GRID_CNT || nearCacheEnabled() ? client : grid(nodeId); - TransactionConcurrency conc = TC_VALS[r.nextInt(TC_VALS.length)]; - TransactionIsolation isolation = TI_VALS[r.nextInt(TI_VALS.length)]; + TransactionConcurrency conc = mvcc ? PESSIMISTIC : TC_VALS[r.nextInt(TC_VALS.length)]; + TransactionIsolation isolation = mvcc ? REPEATABLE_READ :TI_VALS[r.nextInt(TI_VALS.length)]; // Timeout is necessary otherwise deadlock is possible due to randomness of lock acquisition. long timeout = r.nextInt(50) + 50; http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java index 62f4635..cac0427 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxWithSmallTimeoutAndContentionOneKeyTest.java @@ -40,6 +40,7 @@ import org.apache.ignite.internal.util.typedef.internal.SB; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; @@ -112,6 +113,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac * @return Random transaction type. */ protected TransactionConcurrency transactionConcurrency() { + if (MvccFeatureChecker.forcedMvcc()) + return PESSIMISTIC; + ThreadLocalRandom random = ThreadLocalRandom.current(); return random.nextBoolean() ? OPTIMISTIC : PESSIMISTIC; @@ -121,6 +125,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac * @return Random transaction isolation level. */ protected TransactionIsolation transactionIsolation(){ + if (MvccFeatureChecker.forcedMvcc()) + return REPEATABLE_READ; + ThreadLocalRandom random = ThreadLocalRandom.current(); switch (random.nextInt(3)) { @@ -150,6 +157,9 @@ public class TxWithSmallTimeoutAndContentionOneKeyTest extends GridCommonAbstrac * @throws Exception If failed. */ public void test() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-10455"); + startGrids(4); client = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java new file mode 100644 index 0000000..403b5a0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMvccTestSuite7.java @@ -0,0 +1,76 @@ +/* + * 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.testsuites; + +import java.util.HashSet; +import junit.framework.TestSuite; +import org.apache.ignite.IgniteSystemProperties; +import org.apache.ignite.internal.processors.authentication.Authentication1kUsersNodeRestartTest; +import org.apache.ignite.internal.processors.authentication.AuthenticationConfigurationClusterTest; +import org.apache.ignite.internal.processors.authentication.AuthenticationOnNotActiveClusterTest; +import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorNPEOnStartTest; +import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorNodeRestartTest; +import org.apache.ignite.internal.processors.authentication.AuthenticationProcessorSelfTest; +import org.apache.ignite.internal.processors.cache.CacheDataRegionConfigurationTest; +import org.apache.ignite.internal.processors.cache.CacheGroupMetricsMBeanTest; +import org.apache.ignite.internal.processors.cache.MvccCacheGroupMetricsMBeanTest; +import org.apache.ignite.internal.processors.cache.distributed.Cache64kPartitionsTest; +import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersMvccTest; +import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersTest; +import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBufferDeadlockTest; + +/** + * + */ +public class IgniteCacheMvccTestSuite7 extends TestSuite { + /** + * @return IgniteCache test suite. + */ + public static TestSuite suite() { + System.setProperty(IgniteSystemProperties.IGNITE_FORCE_MVCC_MODE_IN_TESTS, "true"); + + HashSet<Class> ignoredTests = new HashSet<>(128); + + // Other non-tx tests. + ignoredTests.add(CheckpointBufferDeadlockTest.class);// + ignoredTests.add(AuthenticationConfigurationClusterTest.class);// + ignoredTests.add(AuthenticationProcessorSelfTest.class); + ignoredTests.add(AuthenticationOnNotActiveClusterTest.class); + ignoredTests.add(AuthenticationProcessorNodeRestartTest.class); + ignoredTests.add(AuthenticationProcessorNPEOnStartTest.class); + ignoredTests.add(Authentication1kUsersNodeRestartTest.class); + ignoredTests.add(CacheDataRegionConfigurationTest.class); + ignoredTests.add(Cache64kPartitionsTest.class); + + // Skip classes which Mvcc implementations are added in this method below. + // TODO IGNITE-10175: refactor these tests (use assume) to support both mvcc and non-mvcc modes after moving to JUnit4/5. + ignoredTests.add(CacheGroupMetricsMBeanTest.class); // See MvccCacheGroupMetricsMBeanTest + ignoredTests.add(GridCacheRebalancingPartitionCountersTest.class); // See GridCacheRebalancingPartitionCountersMvccTest + + TestSuite suite = new TestSuite("IgniteCache Mvcc Test Suite part 7"); + + suite.addTest(IgniteCacheTestSuite7.suite(ignoredTests)); + + // Add Mvcc clones. + suite.addTestSuite(MvccCacheGroupMetricsMBeanTest.class); + suite.addTestSuite(GridCacheRebalancingPartitionCountersMvccTest.class); + + + return suite; + } + +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java index 378c9e9..05aa54c 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java @@ -6,7 +6,7 @@ * (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 + * 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, http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java index d0734a8..f7e1020 100755 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite7.java @@ -34,7 +34,6 @@ import org.apache.ignite.internal.processors.cache.WalModeChangeCoordinatorNotAf import org.apache.ignite.internal.processors.cache.WalModeChangeSelfTest; import org.apache.ignite.internal.processors.cache.distributed.Cache64kPartitionsTest; import org.apache.ignite.internal.processors.cache.distributed.CacheDataLossOnPartitionMoveTest; -import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest; import org.apache.ignite.internal.processors.cache.distributed.CacheRentingStateRepairTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCacheStartWithLoadTest; import org.apache.ignite.internal.processors.cache.distributed.rebalancing.GridCacheRebalancingPartitionCountersTest; @@ -45,6 +44,7 @@ import org.apache.ignite.internal.processors.cache.persistence.db.CheckpointBuff import org.apache.ignite.internal.processors.cache.transactions.TransactionIntegrityWithPrimaryIndexCorruptionTest; import org.apache.ignite.internal.processors.cache.transactions.TxRollbackAsyncWithPersistenceTest; import org.apache.ignite.internal.processors.cache.transactions.TxWithSmallTimeoutAndContentionOneKeyTest; +import org.apache.ignite.testframework.GridTestUtils; /** * Test suite. @@ -63,46 +63,44 @@ public class IgniteCacheTestSuite7 extends TestSuite { * @return Test suite. * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite(Set<Class> ignoredTests) throws Exception { + public static TestSuite suite(Set<Class> ignoredTests) { TestSuite suite = new TestSuite("IgniteCache With Persistence Test Suite"); - suite.addTestSuite(CheckpointBufferDeadlockTest.class); - suite.addTestSuite(IgniteCacheStartWithLoadTest.class); + GridTestUtils.addTestIfNeeded(suite, CheckpointBufferDeadlockTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, IgniteCacheStartWithLoadTest.class, ignoredTests); - suite.addTestSuite(AuthenticationConfigurationClusterTest.class); - suite.addTestSuite(AuthenticationProcessorSelfTest.class); - suite.addTestSuite(AuthenticationOnNotActiveClusterTest.class); - suite.addTestSuite(AuthenticationProcessorNodeRestartTest.class); - suite.addTestSuite(AuthenticationProcessorNPEOnStartTest.class); - suite.addTestSuite(Authentication1kUsersNodeRestartTest.class); + GridTestUtils.addTestIfNeeded(suite, AuthenticationConfigurationClusterTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorSelfTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, AuthenticationOnNotActiveClusterTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorNodeRestartTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, AuthenticationProcessorNPEOnStartTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, Authentication1kUsersNodeRestartTest.class, ignoredTests); - suite.addTestSuite(CacheDataRegionConfigurationTest.class); + GridTestUtils.addTestIfNeeded(suite, CacheDataRegionConfigurationTest.class, ignoredTests); - suite.addTestSuite(WalModeChangeAdvancedSelfTest.class); - suite.addTestSuite(WalModeChangeSelfTest.class); - suite.addTestSuite(WalModeChangeCoordinatorNotAffinityNodeSelfTest.class); + GridTestUtils.addTestIfNeeded(suite, WalModeChangeAdvancedSelfTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, WalModeChangeSelfTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, WalModeChangeCoordinatorNotAffinityNodeSelfTest.class, ignoredTests); - suite.addTestSuite(Cache64kPartitionsTest.class); - suite.addTestSuite(GridCacheRebalancingPartitionCountersTest.class); - suite.addTestSuite(GridCacheRebalancingWithAsyncClearingTest.class); + GridTestUtils.addTestIfNeeded(suite, Cache64kPartitionsTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, GridCacheRebalancingPartitionCountersTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, GridCacheRebalancingWithAsyncClearingTest.class, ignoredTests); - suite.addTestSuite(IgnitePdsCacheAssignmentNodeRestartsTest.class); - suite.addTestSuite(TxRollbackAsyncWithPersistenceTest.class); + GridTestUtils.addTestIfNeeded(suite, IgnitePdsCacheAssignmentNodeRestartsTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, TxRollbackAsyncWithPersistenceTest.class, ignoredTests); - suite.addTestSuite(CacheGroupMetricsMBeanTest.class); - suite.addTestSuite(CacheMetricsManageTest.class); - suite.addTestSuite(PageEvictionMultinodeMixedRegionsTest.class); + GridTestUtils.addTestIfNeeded(suite, CacheGroupMetricsMBeanTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, CacheMetricsManageTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, PageEvictionMultinodeMixedRegionsTest.class, ignoredTests); - suite.addTestSuite(IgniteDynamicCacheStartFailWithPersistenceTest.class); + GridTestUtils.addTestIfNeeded(suite, IgniteDynamicCacheStartFailWithPersistenceTest.class, ignoredTests); - suite.addTestSuite(TxWithSmallTimeoutAndContentionOneKeyTest.class); + GridTestUtils.addTestIfNeeded(suite, TxWithSmallTimeoutAndContentionOneKeyTest.class, ignoredTests); - suite.addTestSuite(CacheRentingStateRepairTest.class); + GridTestUtils.addTestIfNeeded(suite, CacheRentingStateRepairTest.class, ignoredTests); - suite.addTestSuite(TransactionIntegrityWithPrimaryIndexCorruptionTest.class); - suite.addTestSuite(CacheDataLossOnPartitionMoveTest.class); - - suite.addTestSuite(CachePageWriteLockUnlockTest.class); + GridTestUtils.addTestIfNeeded(suite, TransactionIntegrityWithPrimaryIndexCorruptionTest.class, ignoredTests); + GridTestUtils.addTestIfNeeded(suite, CacheDataLossOnPartitionMoveTest.class, ignoredTests); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/9edd7861/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java index ad6bbbf..11f0219 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite4.java @@ -20,6 +20,7 @@ package org.apache.ignite.testsuites; import junit.framework.TestSuite; import org.apache.ignite.cache.ResetLostPartitionTest; import org.apache.ignite.internal.processors.cache.IgniteClusterActivateDeactivateTestWithPersistenceAndMemoryReuse; +import org.apache.ignite.internal.processors.cache.distributed.CachePageWriteLockUnlockTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsRecoveryAfterFileCorruptionTest; import org.apache.ignite.internal.processors.cache.persistence.IgnitePdsTaskCancelingTest; @@ -51,6 +52,8 @@ public class IgnitePdsTestSuite4 extends TestSuite { suite.addTestSuite(ResetLostPartitionTest.class); + suite.addTestSuite(CachePageWriteLockUnlockTest.class); + suite.addTestSuite(IgnitePdsCacheWalDisabledOnRebalancingTest.class); return suite;