You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/06 07:32:42 UTC
[2/5] ignite git commit: Fixed
GridCacheRebalancingUnmarshallingFailedSelfTest.
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-3477-master
Commit: 281efd4b9f0577d55260c7ea53c450e6182085c6
Parents: b6c1761
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 3 19:19:30 2017 +0300
Committer: Ilya Lantukh <il...@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.");
}
}