# ignite-sprint-4 added tests with FairAffinity.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/1ad0b2f2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1ad0b2f2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1ad0b2f2 Branch: refs/heads/ignite-646 Commit: 1ad0b2f2fb46b8981f734240ce163bd9762956bb Parents: d04152d Author: sboikov <sboi...@gridgain.com> Authored: Tue Apr 21 14:33:59 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Tue Apr 21 14:33:59 2015 +0300 ---------------------------------------------------------------------- ...ledFairAffinityMultiNodeFullApiSelfTest.java | 36 ++++++++++++++++++++ ...nlyFairAffinityMultiNodeFullApiSelfTest.java | 36 ++++++++++++++++++++ ...ledFairAffinityMultiNodeFullApiSelfTest.java | 36 ++++++++++++++++++++ ...derFairAffinityMultiNodeFullApiSelfTest.java | 36 ++++++++++++++++++++ ...nlyFairAffinityMultiNodeFullApiSelfTest.java | 35 +++++++++++++++++++ ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 1 + ...nedFairAffinityMultiNodeFullApiSelfTest.java | 3 +- .../IgniteCacheFullApiSelfTestSuite.java | 12 +++++-- 8 files changed, 191 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java new file mode 100644 index 0000000..c5aaeb0 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.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.dht; + +import org.apache.ignite.cache.affinity.fair.*; +import org.apache.ignite.configuration.*; + +/** + * + */ +public class GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest + extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { + CacheConfiguration cfg = super.cacheConfiguration(gridName); + + cfg.setAffinity(new FairAffinityFunction()); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java new file mode 100644 index 0000000..0b493bb --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.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.near; + +import org.apache.ignite.cache.affinity.fair.*; +import org.apache.ignite.configuration.*; + +/** + * + */ +public class GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest + extends GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { + CacheConfiguration cfg = super.cacheConfiguration(gridName); + + cfg.setAffinity(new FairAffinityFunction()); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java new file mode 100644 index 0000000..a26682d --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.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.near; + +import org.apache.ignite.cache.affinity.fair.*; +import org.apache.ignite.configuration.*; + +/** + * + */ +public class GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest + extends GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { + CacheConfiguration cfg = super.cacheConfiguration(gridName); + + cfg.setAffinity(new FairAffinityFunction()); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java new file mode 100644 index 0000000..0ec7d32 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.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.near; + +import org.apache.ignite.cache.affinity.fair.*; +import org.apache.ignite.configuration.*; + +/** + * + */ +public class GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest + extends GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { + CacheConfiguration cfg = super.cacheConfiguration(gridName); + + cfg.setAffinity(new FairAffinityFunction()); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java new file mode 100644 index 0000000..a8e1c70 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java @@ -0,0 +1,35 @@ +/* + * 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.near; + +import org.apache.ignite.cache.affinity.fair.*; +import org.apache.ignite.configuration.*; + +/** + * + */ +public class GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest extends GridCacheNearOnlyMultiNodeFullApiSelfTest { + /** {@inheritDoc} */ + @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { + CacheConfiguration cfg = super.cacheConfiguration(gridName); + + cfg.setAffinity(new FairAffinityFunction()); + + return cfg; + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java index 92ae07a..337a921 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java @@ -75,6 +75,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio return true; } + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java index 94f13f3..d162a49 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java @@ -24,7 +24,8 @@ import org.apache.ignite.internal.processors.cache.distributed.near.*; /** * Multi-node tests for partitioned cache with {@link FairAffinityFunction}. */ -public class GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest { +public class GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest + extends GridCachePartitionedMultiNodeFullApiSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception { CacheConfiguration cfg = super.cacheConfiguration(gridName); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ad0b2f2/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java index 158144a..92742f5 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java @@ -77,9 +77,6 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite { suite.addTestSuite(GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest.class); suite.addTestSuite(GridCacheAtomicNearEnabledPrimaryWriteOrderMultiNodeFullApiSelfTest.class); - // suite.addTestSuite(GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.class); TODO IGNITE-781. - // suite.addTestSuite(GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.class); TODO IGNITE-781. - suite.addTestSuite(GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest.class); suite.addTestSuite(GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest.class); @@ -93,6 +90,15 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite { suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.class); suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class); + // Fair affinity. TODO IGNITE-781. + //suite.addTestSuite(GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.class); + //suite.addTestSuite(GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.class); + suite.addTestSuite(GridCacheNearReloadAllSelfTest.class); suite.addTestSuite(GridCacheColocatedReloadAllSelfTest.class); suite.addTestSuite(GridCacheAtomicReloadAllSelfTest.class);