ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [09/50] [abbrv] incubator-ignite git commit: #IGNITE-106: Revert some renaming.
Date Wed, 04 Feb 2015 12:28:42 GMT
#IGNITE-106: Revert some renaming.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f21a638e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f21a638e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f21a638e

Branch: refs/heads/ignite-6
Commit: f21a638eab7efbcf81dacd40193c4d210d052488
Parents: efb9158
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Feb 2 18:13:31 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Feb 2 18:13:31 2015 +0300

----------------------------------------------------------------------
 .../ignite/examples/BasicExamplesSelfTest.java  |  2 +-
 .../ignite/examples/CacheExamplesSelfTest.java  |  2 +-
 ...heStoreLoadDataExampleMultiNodeSelfTest.java |  2 +-
 .../examples/CheckpointExamplesSelfTest.java    |  2 +-
 .../examples/ContinuationExamplesSelfTest.java  |  2 +-
 .../ContinuousMapperExamplesSelfTest.java       |  2 +-
 .../examples/DeploymentExamplesSelfTest.java    |  2 +-
 .../ignite/examples/EventsExamplesSelfTest.java |  2 +-
 .../HibernateL2CacheExampleSelfTest.java        |  2 +-
 .../examples/IgniteFsExamplesSelfTest.java      |  2 +-
 .../examples/LifecycleExamplesSelfTest.java     |  2 +-
 .../examples/MemcacheRestExamplesSelfTest.java  |  2 +-
 .../examples/MessagingExamplesSelfTest.java     |  2 +-
 .../examples/MonteCarloExamplesSelfTest.java    |  2 +-
 .../examples/ProjectionExampleSelfTest.java     |  2 +-
 .../examples/SpringBeanExamplesSelfTest.java    |  2 +-
 .../ignite/examples/TaskExamplesSelfTest.java   |  2 +-
 .../tests/examples/ScalarExamplesSelfTest.scala |  4 +-
 .../junits/common/AbstractExamplesTest.java     | 79 --------------------
 .../junits/common/GridAbstractExamplesTest.java | 79 ++++++++++++++++++++
 20 files changed, 98 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java
index e95b0cc..ca7b67e 100644
--- a/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/BasicExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Closure examples self test.
  */
-public class BasicExamplesSelfTest extends AbstractExamplesTest {
+public class BasicExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java
index f541390..c34b712 100644
--- a/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/CacheExamplesSelfTest.java
@@ -26,7 +26,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Cache examples self test.
  */
-public class CacheExamplesSelfTest extends AbstractExamplesTest {
+public class CacheExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java
index dc160c9..bcf753c 100644
--- a/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/CacheStoreLoadDataExampleMultiNodeSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  *
  */
-public class CacheStoreLoadDataExampleMultiNodeSelfTest extends AbstractExamplesTest {
+public class CacheStoreLoadDataExampleMultiNodeSelfTest extends GridAbstractExamplesTest
{
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         for (int i = 0; i < RMT_NODES_CNT; i++)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java
index 54e3c22..430dbb3 100644
--- a/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/CheckpointExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Checkpoint examples self test.
  */
-public class CheckpointExamplesSelfTest extends AbstractExamplesTest {
+public class CheckpointExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * Starts remote nodes before each test.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java
index 48ca73e..8100f79 100644
--- a/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/ContinuationExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Continuation example self test.
  */
-public class ContinuationExamplesSelfTest extends AbstractExamplesTest {
+public class ContinuationExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java
index cbb79d6..c4d8622 100644
--- a/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/ContinuousMapperExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * GridContinuousMapperExample self test.
  */
-public class ContinuousMapperExamplesSelfTest extends AbstractExamplesTest {
+public class ContinuousMapperExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java
index 8fd4da0..3b4a399 100644
--- a/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/DeploymentExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Deployment examples self test.
  */
-public class DeploymentExamplesSelfTest extends AbstractExamplesTest {
+public class DeploymentExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java
index 55341ba..fdb4509 100644
--- a/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/EventsExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Events examples self test.
  */
-public class EventsExamplesSelfTest extends AbstractExamplesTest {
+public class EventsExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java
index 0c46894..d38a1c3 100644
--- a/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/HibernateL2CacheExampleSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Tests the {@link HibernateL2CacheExample}.
  */
-public class HibernateL2CacheExampleSelfTest extends AbstractExamplesTest {
+public class HibernateL2CacheExampleSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
index ec26b4e..8ac2a5c 100644
--- a/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/IgniteFsExamplesSelfTest.java
@@ -24,7 +24,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * IgniteFs examples self test.
  */
-public class IgniteFsExamplesSelfTest extends AbstractExamplesTest {
+public class IgniteFsExamplesSelfTest extends GridAbstractExamplesTest {
     /** GGFS config with shared memory IPC. */
     private static final String GGFS_SHMEM_CFG = "modules/core/src/test/config/ggfs-shmem.xml";
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java
index 4b148a5..4dafcbf 100644
--- a/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/LifecycleExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * GridLifecycleExample self test.
  */
-public class LifecycleExamplesSelfTest extends AbstractExamplesTest {
+public class LifecycleExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java
index 4349bd5..ebb4071 100644
--- a/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/MemcacheRestExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * GridMemcacheRestExample self test.
  */
-public class MemcacheRestExamplesSelfTest extends AbstractExamplesTest {
+public class MemcacheRestExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java
index 80235b1..2bafb0f 100644
--- a/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/MessagingExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Messaging examples self test.
  */
-public class MessagingExamplesSelfTest extends AbstractExamplesTest {
+public class MessagingExamplesSelfTest extends GridAbstractExamplesTest {
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         startGrid("companion", DFLT_CFG);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java
index 634ba44..0e0267a 100644
--- a/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/MonteCarloExamplesSelfTest.java
@@ -64,7 +64,7 @@ import org.apache.ignite.testframework.junits.common.*;
  *      Classpath should contain the {@code ${IGNITE_HOME}/modules/tests/config/aop/aspectj}
folder.
  * </li>
  */
-public class MonteCarloExamplesSelfTest extends AbstractExamplesTest {
+public class MonteCarloExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/ProjectionExampleSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/ProjectionExampleSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/ProjectionExampleSelfTest.java
index 9944c42..cddc750 100644
--- a/examples/src/test/java/org/apache/ignite/examples/ProjectionExampleSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/ProjectionExampleSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  *
  */
-public class ProjectionExampleSelfTest extends AbstractExamplesTest {
+public class ProjectionExampleSelfTest extends GridAbstractExamplesTest {
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         // Start up a cluster node.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java
b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java
index 4110b99..70c86c5 100644
--- a/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/SpringBeanExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Spring bean examples self test.
  */
-public class SpringBeanExamplesSelfTest extends AbstractExamplesTest {
+public class SpringBeanExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java
----------------------------------------------------------------------
diff --git a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java
index 54d5ff6..42b7276 100644
--- a/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java
+++ b/examples/src/test/java/org/apache/ignite/examples/TaskExamplesSelfTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.testframework.junits.common.*;
 /**
  * Hello world examples self test.
  */
-public class TaskExamplesSelfTest extends AbstractExamplesTest {
+public class TaskExamplesSelfTest extends GridAbstractExamplesTest {
     /**
      * @throws Exception If failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala
----------------------------------------------------------------------
diff --git a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala
b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala
index f9b503d..6852ac9 100644
--- a/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala
+++ b/examples/src/test/scala/org/apache/ignite/scalar/tests/examples/ScalarExamplesSelfTest.scala
@@ -19,13 +19,13 @@ package org.apache.ignite.scalar.tests.examples
 
 import org.apache.ignite.scalar.examples._
 import org.apache.ignite.scalar.scalar
-import org.apache.ignite.testframework.junits.common.AbstractExamplesTest
+import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest
 import org.scalatest.junit.JUnitSuiteLike
 
 /**
  * Scalar examples self test.
  */
-class ScalarExamplesSelfTest extends AbstractExamplesTest with JUnitSuiteLike {
+class ScalarExamplesSelfTest extends GridAbstractExamplesTest with JUnitSuiteLike {
     /** */
     private def EMPTY_ARGS = Array.empty[String]
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/AbstractExamplesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/AbstractExamplesTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/AbstractExamplesTest.java
deleted file mode 100644
index a523066..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/AbstractExamplesTest.java
+++ /dev/null
@@ -1,79 +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.testframework.junits.common;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Base class for examples test.
- */
-public abstract class AbstractExamplesTest extends GridCommonAbstractTest {
-    /** */
-    protected static final String[] EMPTY_ARGS = new String[0];
-
-    /** */
-    protected static final int RMT_NODES_CNT = 3;
-
-    /** */
-    protected static final String RMT_NODE_CFGS = "modules/core/src/test/config/examples.properties";
-
-    /** */
-    protected static final String DFLT_CFG = "examples/config/example-compute.xml";
-
-    /** */
-    private static final Properties rmtCfgs = new Properties();
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * Starts remote nodes.
-     *
-     * @throws Exception If failed.
-     */
-    protected final void startRemoteNodes() throws Exception {
-        String name = getName().replaceFirst("test", "");
-
-        if (rmtCfgs.isEmpty()) {
-            info("Loading remote configs properties from file: " + RMT_NODE_CFGS);
-
-            try (FileReader reader = new FileReader(U.resolveGridGainPath(RMT_NODE_CFGS)))
{
-                rmtCfgs.load(reader);
-            }
-        }
-
-        String cfg = rmtCfgs.getProperty(name, defaultConfig());
-
-        info("Config for remote nodes [name=" + name + ", cfg=" + cfg + ", dflt=" + defaultConfig()
+ "]");
-
-        for (int i = 0; i < RMT_NODES_CNT; i++)
-            startGrid(getTestGridName(i), cfg);
-    }
-
-    /**
-     * @return Default config for this test.
-     */
-    protected String defaultConfig() {
-        return DFLT_CFG;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f21a638e/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java
new file mode 100644
index 0000000..9df954a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridAbstractExamplesTest.java
@@ -0,0 +1,79 @@
+/*
+ * 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.testframework.junits.common;
+
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Base class for examples test.
+ */
+public abstract class GridAbstractExamplesTest extends GridCommonAbstractTest {
+    /** */
+    protected static final String[] EMPTY_ARGS = new String[0];
+
+    /** */
+    protected static final int RMT_NODES_CNT = 3;
+
+    /** */
+    protected static final String RMT_NODE_CFGS = "modules/core/src/test/config/examples.properties";
+
+    /** */
+    protected static final String DFLT_CFG = "examples/config/example-compute.xml";
+
+    /** */
+    private static final Properties rmtCfgs = new Properties();
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /**
+     * Starts remote nodes.
+     *
+     * @throws Exception If failed.
+     */
+    protected final void startRemoteNodes() throws Exception {
+        String name = getName().replaceFirst("test", "");
+
+        if (rmtCfgs.isEmpty()) {
+            info("Loading remote configs properties from file: " + RMT_NODE_CFGS);
+
+            try (FileReader reader = new FileReader(U.resolveGridGainPath(RMT_NODE_CFGS)))
{
+                rmtCfgs.load(reader);
+            }
+        }
+
+        String cfg = rmtCfgs.getProperty(name, defaultConfig());
+
+        info("Config for remote nodes [name=" + name + ", cfg=" + cfg + ", dflt=" + defaultConfig()
+ "]");
+
+        for (int i = 0; i < RMT_NODES_CNT; i++)
+            startGrid(getTestGridName(i), cfg);
+    }
+
+    /**
+     * @return Default config for this test.
+     */
+    protected String defaultConfig() {
+        return DFLT_CFG;
+    }
+}


Mime
View raw message