ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [19/49] incubator-ignite git commit: GG-9655 - Fixing tests after merge.
Date Sun, 15 Feb 2015 08:18:39 GMT
GG-9655 - Fixing tests after merge.


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

Branch: refs/heads/sprint-1
Commit: bc8913950a1aa95ae9713a59bb278543d097c39f
Parents: be5b908
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Mon Feb 2 22:31:50 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Mon Feb 2 22:31:50 2015 -0800

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheReturn.java | 10 ++++++++++
 .../cache/distributed/dht/GridDhtTxPrepareFuture.java     |  2 ++
 .../processors/cache/IgniteCacheInvokeAbstractTest.java   |  6 +++---
 3 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc891395/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
index 09a566f..93e5a0f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
@@ -109,6 +109,13 @@ public class GridCacheReturn<V> implements Externalizable, IgniteOptimizedMarsha
     }
 
     /**
+     * @param invokeRes Invoke result flag.
+     */
+    public void invokeResult(boolean invokeRes) {
+        this.invokeRes = invokeRes;
+    }
+
+    /**
      * @param v Value.
      * @return This instance for chaining.
      */
@@ -177,6 +184,9 @@ public class GridCacheReturn<V> implements Externalizable, IgniteOptimizedMarsha
         assert invokeRes || v == null : "Invalid state to merge: " + this;
         assert other.invokeRes;
 
+        if (other.v == null)
+            return;
+
         invokeRes = true;
 
         HashMap<Object, EntryProcessorResult> resMap = (HashMap<Object, EntryProcessorResult>)v;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc891395/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 406a589..ea9aa00 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -342,6 +342,8 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
                             if (err != null || procRes != null)
                                 ret.addEntryProcessResult(key,
                                     err == null ? new CacheInvokeResult<>(procRes)
: new CacheInvokeResult<>(err));
+                            else
+                                ret.invokeResult(true);
                         }
                         else
                             ret.value(val);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bc891395/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index ca760e9..5d55546 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -339,7 +339,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
 
             switch (key % 4) {
                 case 0: {
-                    assertNotNull("No result for " + key);
+                    assertNotNull("No result for " + key, res);
 
                     assertEquals(62, (int)res.get());
 
@@ -357,7 +357,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
                 }
 
                 case 2: {
-                    assertNotNull("No result for " + key);
+                    assertNotNull("No result for " + key, res);
 
                     assertEquals(3, (int)res.get());
 
@@ -367,7 +367,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
                 }
 
                 case 3: {
-                    assertNotNull("No result for " + key);
+                    assertNotNull("No result for " + key, res);
 
                     GridTestUtils.assertThrows(log, new Callable<Void>() {
                         @Override public Void call() throws Exception {


Mime
View raw message