Repository: ignite
Updated Branches:
  refs/heads/master 7402ea110 -> 9193c58b6


Fixed CacheGetFromJobTest failure (wait for correct exchange version for cache 
start operation).


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

Branch: refs/heads/master
Commit: d9a30e8bc285672418f800b527d0aa8e7dd3a4ff
Parents: 86465f5
Author: sboikov <sboi...@gridgain.com>
Authored: Fri May 19 10:27:24 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Fri May 19 10:27:24 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/ClusterCachesInfo.java  | 14 ++++++++++++--
 .../processors/cache/CacheGetFromJobTest.java         |  5 +++++
 2 files changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a30e8b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index 28ec600..7150cf4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@ -350,8 +350,18 @@ class ClusterCachesInfo {
                 if (!needExchange && desc != null) {
                     if (desc.clientCacheStartVersion() != null)
                         waitTopVer = desc.clientCacheStartVersion();
-                    else
-                        waitTopVer = desc.startTopologyVersion();
+                    else {
+                        AffinityTopologyVersion nodeStartVer =
+                            new 
AffinityTopologyVersion(ctx.discovery().localNode().order(), 0);
+
+                        if (desc.startTopologyVersion() != null)
+                            waitTopVer = desc.startTopologyVersion();
+                        else
+                            waitTopVer = desc.receivedFromStartVersion();
+
+                        if (waitTopVer == null || 
nodeStartVer.compareTo(waitTopVer) > 0)
+                            waitTopVer = nodeStartVer;
+                    }
                 }
             }
             else if (req.globalStateChange())

http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a30e8b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java
index a48f342..7c9eeec 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetFromJobTest.java
@@ -41,6 +41,11 @@ public class CacheGetFromJobTest extends 
GridCacheAbstractSelfTest {
         stopAllGrids();
     }
 
+    /** {@inheritDoc} */
+    @Override protected long getTestTimeout() {
+        return 5 * 60_000;
+    }
+
     /**
      * @throws Exception If failed.
      */

Reply via email to