ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [02/10] ignite git commit: Fixed GridCacheRebalancingUnmarshallingFailedSelfTest.
Date Thu, 06 Apr 2017 11:19:37 GMT
Fixed GridCacheRebalancingUnmarshallingFailedSelfTest.


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

Branch: refs/heads/ignite-4811-no-start-ver
Commit: 281efd4b9f0577d55260c7ea53c450e6182085c6
Parents: b6c1761
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Mon Apr 3 19:19:30 2017 +0300
Committer: Ilya Lantukh <ilantukh@gridgain.com>
Committed: Mon Apr 3 19:19:30 2017 +0300

----------------------------------------------------------------------
 .../GridCacheRebalancingUnmarshallingFailedSelfTest.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/281efd4b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java
index 6d3f707..d745dcd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java
@@ -32,6 +32,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.config.GridTestProperties;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.thread.IgniteThread;
 
 /**
  *
@@ -90,7 +91,10 @@ public class GridCacheRebalancingUnmarshallingFailedSelfTest extends GridCommonA
         @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
             field = (String)in.readObject();
 
-            if (readCnt.decrementAndGet() <= 0)
+            Thread cur = Thread.currentThread();
+
+            // Decrement readCnt and fail only on node with index 1.
+            if (cur instanceof IgniteThread && ((IgniteThread)cur).getIgniteInstanceName().endsWith("1")
&& readCnt.decrementAndGet() <= 0)
                 throw new IOException("Class can not be unmarshalled.");
         }
     }


Mime
View raw message