Repository: incubator-ignite Updated Branches: refs/heads/ignite-1090 eb9f13e38 -> 1617a99da
# ignite-1090 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1617a99d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1617a99d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1617a99d Branch: refs/heads/ignite-1090 Commit: 1617a99da16c4c9cf1c2b5c196579177907e2b3f Parents: eb9f13e Author: sboikov <sboi...@gridgain.com> Authored: Tue Jul 21 16:34:15 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Tue Jul 21 16:34:15 2015 +0300 ---------------------------------------------------------------------- ...NearDisabledOptimisticTxNodeRestartTest.java | 31 ++++++++++++++++++++ ...ePartitionedOptimisticTxNodeRestartTest.java | 19 +++++++++--- .../testsuites/IgniteCacheRestartTestSuite.java | 2 ++ 3 files changed, 48 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1617a99d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.java new file mode 100644 index 0000000..cacc63e --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.java @@ -0,0 +1,31 @@ +/* + * 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.dht; + +import org.apache.ignite.internal.processors.cache.distributed.near.*; + +/** + * + */ +public class GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest + extends GridCachePartitionedOptimisticTxNodeRestartTest { + /** {@inheritDoc} */ + @Override protected boolean nearEnabled() { + return false; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1617a99d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java index 87f6e3d..823ad33 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOptimisticTxNodeRestartTest.java @@ -31,6 +31,12 @@ import static org.apache.ignite.transactions.TransactionConcurrency.*; */ public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAbstractNodeRestartSelfTest { /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (nearEnabled()) + fail("https://issues.apache.org/jira/browse/IGNITE-1090"); + } + + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration c = super.getConfiguration(gridName); @@ -47,11 +53,20 @@ public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAb cc.setAffinity(new RendezvousAffinityFunction(false, partitions)); cc.setBackups(backups); + cc.setNearConfiguration(nearEnabled() ? new NearCacheConfiguration() : null); + c.setCacheConfiguration(cc); return c; } + /** + * @return {@code True} if near cache enabled. + */ + protected boolean nearEnabled() { + return true; + } + /** {@inheritDoc} */ @Override protected TransactionConcurrency txConcurrency() { return OPTIMISTIC; @@ -96,8 +111,6 @@ public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAb /** {@inheritDoc} */ @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { - fail("https://issues.apache.org/jira/browse/IGNITE-1090"); - super.testRestartWithTxFourNodesNoBackups(); } @@ -118,8 +131,6 @@ public class GridCachePartitionedOptimisticTxNodeRestartTest extends GridCacheAb /** {@inheritDoc} */ @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { - fail("https://issues.apache.org/jira/browse/IGNITE-1090"); - super.testRestartWithTxTwoNodesNoBackups(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1617a99d/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java index 9928cf3..29c981e 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheRestartTestSuite.java @@ -20,6 +20,7 @@ package org.apache.ignite.testsuites; import junit.framework.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.*; +import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.apache.ignite.internal.processors.cache.distributed.replicated.*; @@ -37,6 +38,7 @@ public class IgniteCacheRestartTestSuite extends TestSuite { suite.addTestSuite(GridCachePartitionedNodeRestartTest.class); suite.addTestSuite(GridCachePartitionedOptimisticTxNodeRestartTest.class); suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class); + suite.addTestSuite(GridCachePartitionedNearDisabledOptimisticTxNodeRestartTest.class); suite.addTestSuite(IgniteCacheAtomicNodeRestartTest.class); suite.addTestSuite(IgniteCacheAtomicReplicatedNodeRestartSelfTest.class);