ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/6] incubator-ignite git commit: sp-1 fixed test
Date Fri, 13 Feb 2015 00:31:37 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-9655-merge 0e50dbdd2 -> ff2da2090


sp-1 fixed test


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

Branch: refs/heads/ignite-9655-merge
Commit: 43e574da1c83f6d1af9441b691dea5a6262effdb
Parents: 422ffb1
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Feb 13 00:21:42 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Feb 13 00:21:42 2015 +0300

----------------------------------------------------------------------
 .../discovery/GridDiscoveryManagerSelfTest.java | 31 ++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/43e574da/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerSelfTest.java
index 3548e97..90c3af6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerSelfTest.java
@@ -17,9 +17,12 @@
 
 package org.apache.ignite.internal.managers.discovery;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -123,6 +126,20 @@ public class GridDiscoveryManagerSelfTest extends GridCommonAbstractTest
{
 
         stopGrid(1);
 
+        // Wait all nodes are on version 4.
+        for (;;) {
+            if (F.forAll(
+                Ignition.allGrids(),
+                new IgnitePredicate<Ignite>() {
+                    @Override public boolean apply(Ignite ignite) {
+                        return ignite.cluster().topologyVersion() == 4;
+                    }
+                }))
+                break;
+
+            Thread.sleep(1000);
+        }
+
         assertFalse(g0.context().discovery().hasNearCache(CACHE_NAME, 1));
         assertTrue(g0.context().discovery().hasNearCache(CACHE_NAME, 2));
         assertTrue(g0.context().discovery().hasNearCache(CACHE_NAME, 3));
@@ -139,6 +156,20 @@ public class GridDiscoveryManagerSelfTest extends GridCommonAbstractTest
{
 
         stopGrid(2);
 
+        // Wait all nodes are on version 5.
+        for (;;) {
+            if (F.forAll(
+                Ignition.allGrids(),
+                new IgnitePredicate<Ignite>() {
+                    @Override public boolean apply(Ignite ignite) {
+                        return ignite.cluster().topologyVersion() == 5;
+                    }
+                }))
+                break;
+
+            Thread.sleep(1000);
+        }
+
         assertFalse(g0.context().discovery().hasNearCache(CACHE_NAME, 1));
         assertTrue(g0.context().discovery().hasNearCache(CACHE_NAME, 2));
         assertTrue(g0.context().discovery().hasNearCache(CACHE_NAME, 3));


Mime
View raw message