ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [7/9] incubator-ignite git commit: # ignite utility methods for tests
Date Tue, 30 Dec 2014 09:07:21 GMT
# 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-1
Commit: 8488174594e1f06a42dafc1e03107d79e0acd3ef
Parents: 7543f27
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Dec 30 11:10:12 2014 +0300
Committer: sboikov <sboikov@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");
+    }
 }


Mime
View raw message