You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/30 10:29:58 UTC

[07/12] incubator-ignite git commit: # ignite utility methods for tests

# ignite utility methods for tests


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

Branch: refs/heads/ignite-44
Commit: 8488174594e1f06a42dafc1e03107d79e0acd3ef
Parents: 7543f27
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 30 11:10:12 2014 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 30 11:10:12 2014 +0300

----------------------------------------------------------------------
 .../src/main/java/org/gridgain/grid/util/GridUtils.java   | 10 ++++++++++
 .../java/org/gridgain/testframework/GridTestUtils.java    |  7 +++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84881745/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
index b687a31..37c2109 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
@@ -5596,6 +5596,16 @@ public abstract class GridUtils {
     }
 
     /**
+     * Checks if given class is of {@code Ignite} type.
+     *
+     * @param cls Class to check.
+     * @return {@code True} if given class is of {@code GridGain} type.
+     */
+    public static boolean isIgnite(Class<?> cls) {
+        return cls.getName().startsWith("org.apache.ignite");
+    }
+
+    /**
      * Checks if given class is of {@code Grid} type.
      *
      * @param cls Class to check.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84881745/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java b/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
index bdd7042..092abbf 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/GridTestUtils.java
@@ -1382,4 +1382,11 @@ public final class GridTestUtils {
 
         return res;
     }
+
+    /**
+     * @return Path to apache ignite.
+     */
+    public static String apacheIgniteTestPath() {
+        return System.getProperty("IGNITE_TEST_PATH", U.getGridGainHome() + "/target/ignite");
+    }
 }