ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [01/33] ignite git commit: Use special method for test debug info dumping to avoid waiting for hanging nodes start.
Date Fri, 28 Aug 2015 14:01:32 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1093 d89f1b0af -> 58a4199ba


Use special method  for test debug info dumping to avoid waiting for hanging nodes start.


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

Branch: refs/heads/ignite-1093
Commit: fc60fee5f727210f5a3a16997e2bd6b7b07a4539
Parents: 5877b30
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Aug 27 12:07:47 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Aug 27 12:07:47 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/IgnitionEx.java  | 23 ++++++++++++++++++--
 .../testframework/junits/GridAbstractTest.java  |  2 +-
 2 files changed, 22 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fc60fee5/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index fd74745..cd91fa8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -1015,10 +1015,29 @@ public class IgnitionEx {
      * @return List of all grids started so far.
      */
     public static List<Ignite> allGrids() {
+        return allGrids(true);
+    }
+
+    /**
+     * Gets a list of all grids started so far.
+     *
+     * @return List of all grids started so far.
+     */
+    public static List<Ignite> allGridsx() {
+        return allGrids(false);
+    }
+
+    /**
+     * Gets a list of all grids started so far.
+     *
+     * @param wait If {@code true} wait for node start finish.
+     * @return List of all grids started so far.
+     */
+    private static List<Ignite> allGrids(boolean wait) {
         List<Ignite> allIgnites = new ArrayList<>(grids.size() + 1);
 
         for (IgniteNamedInstance grid : grids.values()) {
-            Ignite g = grid.grid();
+            Ignite g = wait ? grid.grid() : grid.gridx();
 
             if (g != null)
                 allIgnites.add(g);
@@ -1027,7 +1046,7 @@ public class IgnitionEx {
         IgniteNamedInstance dfltGrid0 = dfltGrid;
 
         if (dfltGrid0 != null) {
-            IgniteKernal g = dfltGrid0.grid();
+            IgniteKernal g = wait ? dfltGrid0.grid() : dfltGrid0.gridx();
 
             if (g != null)
                 allIgnites.add(g);

http://git-wip-us.apache.org/repos/asf/ignite/blob/fc60fee5/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index d6591cd..9cd621a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -1578,7 +1578,7 @@ public abstract class GridAbstractTest extends TestCase {
                 "Test has been timed out and will be interrupted (threads dump will be taken
before interruption) [" +
                 "test=" + getName() + ", timeout=" + getTestTimeout() + ']');
 
-            List<Ignite> nodes = G.allGrids();
+            List<Ignite> nodes = IgnitionEx.allGridsx();
 
             for (Ignite node : nodes)
                 ((IgniteKernal)node).dumpDebugInfo();


Mime
View raw message