Repository: incubator-ignite Updated Branches: refs/heads/ignite-250 9ae0eb892 -> ee27d241c
#IGNITE-250 Removed test on ent compatibility version. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ee27d241 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ee27d241 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ee27d241 Branch: refs/heads/ignite-250 Commit: ee27d241c0ac5826fd021fd8065c57fbe4b6e7ec Parents: 9ae0eb8 Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Sat Feb 14 15:01:16 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Sat Feb 14 15:01:16 2015 +0300 ---------------------------------------------------------------------- .../GridTopologyBuildVersionSelfTest.java | 101 ------------------- .../ignite/testsuites/IgniteBasicTestSuite.java | 1 - 2 files changed, 102 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee27d241/modules/core/src/test/java/org/apache/ignite/internal/GridTopologyBuildVersionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridTopologyBuildVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridTopologyBuildVersionSelfTest.java deleted file mode 100644 index 556135f..0000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridTopologyBuildVersionSelfTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.internal; - -import org.apache.ignite.cluster.*; -import org.apache.ignite.configuration.*; -import org.apache.ignite.internal.util.typedef.*; -import org.apache.ignite.lang.*; -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.*; - -import java.util.*; -import java.util.concurrent.atomic.*; - -/** - * Tests build version setting into discovery maps. - */ -public class GridTopologyBuildVersionSelfTest extends GridCommonAbstractTest { - /** IP finder. */ - private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); - - /** Counter. */ - private static final AtomicInteger cnt = new AtomicInteger(); - - /** Test compatible versions. */ - private static final Collection<String> COMPATIBLE_VERS = - F.asList("1.0.0-ent", "2.0.0-ent", "3.0.0-ent", "4.0.0-ent"); - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - final int idx = cnt.incrementAndGet(); - - // Override node attributes in discovery spi. - TcpDiscoverySpi discoSpi = new TcpDiscoverySpi() { - @Override public void setNodeAttributes(Map<String, Object> attrs, IgniteProductVersion ver) { - super.setNodeAttributes(attrs, ver); - - attrs.put(IgniteNodeAttributes.ATTR_BUILD_VER, idx + ".0.0" + "-ent"); - - if (idx < 3) - attrs.remove(IgniteNodeAttributes.ATTR_BUILD_DATE); - else - attrs.put(IgniteNodeAttributes.ATTR_BUILD_DATE, "1385099743"); - - attrs.put(IgniteNodeAttributes.ATTR_COMPATIBLE_VERS, COMPATIBLE_VERS); - } - }; - - discoSpi.setIpFinder(IP_FINDER); - - cfg.setDiscoverySpi(discoSpi); - - return cfg; - } - - /** - * @throws Exception If failed. - */ - public void testVersioning() throws Exception { - startGrids(4); - - try { - for (int i = 3; i >= 0; i--) { - IgniteKernal g = (IgniteKernal)grid(i); - - NavigableMap<IgniteProductVersion, Collection<ClusterNode>> verMap = g.context().discovery() - .topologyVersionMap(); - - assertEquals(4, verMap.size()); - - // Now check the map itself. - assertEquals(4, verMap.get(IgniteProductVersion.fromString("1.0.0")).size()); - assertEquals(3, verMap.get(IgniteProductVersion.fromString("2.0.0")).size()); - assertEquals(2, verMap.get(IgniteProductVersion.fromString("3.0.0-ent-1385099743")).size()); - assertEquals(1, verMap.get(IgniteProductVersion.fromString("4.0.0-ent-1385099743")).size()); - } - } - finally { - stopAllGrids(); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ee27d241/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index 6399dad..4cfeaff 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -55,7 +55,6 @@ public class IgniteBasicTestSuite extends TestSuite { if (U.isLinux() || U.isMacOs()) suite.addTest(IgniteIpcSharedMemorySelfTestSuite.suite()); - suite.addTestSuite(GridTopologyBuildVersionSelfTest.class); suite.addTestSuite(GridReleaseTypeSelfTest.class); suite.addTestSuite(GridProductVersionSelfTest.class); suite.addTestSuite(GridAffinityProcessorConsistentHashSelfTest.class);