#ignite-gg-10369: Add test for gridgain and ignite nodes. (cherry picked from commit 33d2626)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d66a141c Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d66a141c Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d66a141c Branch: refs/heads/ignite-gg-10369-2 Commit: d66a141c1166e3a7fbbe1bee35eb2b14867ae1fa Parents: 447fc08 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Fri May 29 12:04:27 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Fri May 29 15:01:58 2015 +0300 ---------------------------------------------------------------------- .../ignite/internal/util/GridJavaProcess.java | 2 +- .../org/apache/ignite/jvmtest/StartNode.java | 59 -------------------- 2 files changed, 1 insertion(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d66a141c/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java index 6baa179..42fe089 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java @@ -138,7 +138,7 @@ public final class GridJavaProcess { procCommands.add(javaBin); procCommands.addAll(jvmArgs == null ? U.jvmArgs() : jvmArgs); - if (!jvmArgs.contains("-cp") || !jvmArgs.contains("-classpath")) { + if (!jvmArgs.contains("-cp") && !jvmArgs.contains("-classpath")) { String classpath = System.getProperty("java.class.path"); String sfcp = System.getProperty("surefire.test.class.path"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d66a141c/modules/core/src/test/java/org/apache/ignite/jvmtest/StartNode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/jvmtest/StartNode.java b/modules/core/src/test/java/org/apache/ignite/jvmtest/StartNode.java deleted file mode 100644 index ab35934..0000000 --- a/modules/core/src/test/java/org/apache/ignite/jvmtest/StartNode.java +++ /dev/null @@ -1,59 +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.jvmtest; - -import org.apache.ignite.*; -import org.apache.ignite.configuration.*; -import org.apache.ignite.spi.discovery.tcp.*; -import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*; - -import java.util.*; - -/** - * Test class to start node in GridJavaProcess. - */ -public class StartNode { - /** - * @return Configuration. - */ - public static IgniteConfiguration createConfiguration() { - IgniteConfiguration cfg = new IgniteConfiguration(); - - cfg.setPeerClassLoadingEnabled(true); - - cfg.setLocalHost("127.0.0.1"); - - TcpDiscoverySpi disco = new TcpDiscoverySpi(); - - disco.setIpFinderCleanFrequency(1000); - - TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(); - - ipFinder.setAddresses(Arrays.asList("127.0.0.1:47500..47509")); - - disco.setIpFinder(ipFinder); - - cfg.setDiscoverySpi(disco); - - return cfg; - } - - public static void main(String[] args) { - Ignition.start(createConfiguration()); - } -}