ignite-5517 removed because it is no longer relevant
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eeb441ab Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eeb441ab Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eeb441ab Branch: refs/heads/ignite-5267-1 Commit: eeb441abf28b320c3189aeb8387d4745c3cf18dd Parents: 265a029 Author: Dmitriy Govorukhin <[email protected]> Authored: Fri Jun 16 10:39:10 2017 +0300 Committer: Dmitriy Govorukhin <[email protected]> Committed: Fri Jun 16 10:39:10 2017 +0300 ---------------------------------------------------------------------- ...ActiveOnStartNodeJoinValidationSelfTest.java | 134 ------------------- .../testsuites/IgniteCacheTestSuite5.java | 2 - 2 files changed, 136 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/eeb441ab/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteActiveOnStartNodeJoinValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteActiveOnStartNodeJoinValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteActiveOnStartNodeJoinValidationSelfTest.java deleted file mode 100644 index 223091e..0000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteActiveOnStartNodeJoinValidationSelfTest.java +++ /dev/null @@ -1,134 +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.processors.cache.distributed; - -import org.apache.ignite.Ignite; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.util.typedef.X; -import org.apache.ignite.spi.IgniteSpiException; -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.junits.common.GridCommonAbstractTest; - -/** - * - */ -public class IgniteActiveOnStartNodeJoinValidationSelfTest extends GridCommonAbstractTest { - /** */ - private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - - /** */ - private boolean activeOnStart; - - /** */ - private boolean client; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - cfg.setActiveOnStart(activeOnStart); - - ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder); - - cfg.setClientMode(client); - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - stopAllGrids(); - - super.afterTest(); - } - - /** - * @throws Exception If failed. - */ - public void testJoinValidation1() throws Exception { - checkNodeJoinValidation(false); - } - - /** - * @throws Exception If failed. - */ - public void testJoinValidation2() throws Exception { - checkNodeJoinValidation(true); - } - - /** - * @param firstEnabled Flag value for first started node. - * @throws Exception If failed. - */ - public void checkNodeJoinValidation(boolean firstEnabled) throws Exception { - activeOnStart = firstEnabled; - - Ignite ignite = startGrid(0); - - assertFalse(ignite.configuration().isClientMode()); - - activeOnStart = !firstEnabled; - - try { - startGrid(1); - - fail(); - } - catch (Exception e) { - checkError(e); - } - - client = true; - - try { - startGrid(1); - - fail(); - } - catch (Exception e) { - checkError(e); - } - - assertEquals(1, ignite.cluster().nodes().size()); - - activeOnStart = firstEnabled; - - client = false; - - startGrid(1); - - client = true; - - Ignite client = startGrid(2); - - assertTrue(client.configuration().isClientMode()); - } - - /** - * @param e Error. - */ - private void checkError(Exception e) { - IgniteSpiException err = X.cause(e, IgniteSpiException.class); - - assertNotNull(err); - assertTrue(err.getMessage().contains("Local node's active on start flag differs " + - "from the same property on remote node")); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/eeb441ab/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java index 18b9258..a16d2cc 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java @@ -36,7 +36,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheStoreCollectionTes import org.apache.ignite.internal.processors.cache.PartitionsExchangeOnDiscoveryHistoryOverflowTest; import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentNodeJoinValidationTest; import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentTest; -import org.apache.ignite.internal.processors.cache.distributed.IgniteActiveOnStartNodeJoinValidationSelfTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheGroupsPartitionLossPolicySelfTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCachePartitionLossPolicySelfTest; import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheTxIteratorSelfTest; @@ -64,7 +63,6 @@ public class IgniteCacheTestSuite5 extends TestSuite { suite.addTestSuite(CacheLateAffinityAssignmentTest.class); suite.addTestSuite(CacheLateAffinityAssignmentNodeJoinValidationTest.class); - suite.addTestSuite(IgniteActiveOnStartNodeJoinValidationSelfTest.class); suite.addTestSuite(EntryVersionConsistencyReadThroughTest.class); suite.addTestSuite(IgniteCacheSyncRebalanceModeSelfTest.class);
