ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [24/46] ignite git commit: Minor.
Date Tue, 15 Sep 2015 06:00:58 GMT
Minor.


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

Branch: refs/heads/master
Commit: b4c515e62bc8412a2859a5a771ef3c4b38691529
Parents: 095d4b3
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Sep 14 11:37:36 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Sep 14 11:37:36 2015 +0300

----------------------------------------------------------------------
 .../dht/GridCacheTxNodeFailureSelfTest.java      | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4c515e6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
index 1135c40..dc78003 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java
@@ -36,8 +36,10 @@ import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.plugin.extensions.communication.Message;
-import org.apache.ignite.spi.IgniteSpiException;
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
@@ -59,6 +61,9 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA
  */
 @SuppressWarnings("unchecked")
 public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
     /**
      * @return Grid count.
      */
@@ -70,6 +75,8 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
         cfg.setCacheConfiguration(cacheConfiguration(gridName));
 
         cfg.setCommunicationSpi(new BanningCommunicationSpi());
@@ -202,9 +209,8 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
 
             final CountDownLatch commitLatch = new CountDownLatch(1);
 
-            if (!commit) {
+            if (!commit)
                 communication(1).bannedClasses(Collections.<Class>singletonList(GridDhtTxPrepareRequest.class));
-            }
             else {
                 if (!backup) {
                     communication(2).bannedClasses(Collections.<Class>singletonList(GridDhtTxPrepareResponse.class));
@@ -389,12 +395,11 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest
{
         }
 
         /** {@inheritDoc} */
-        @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException>
ackClosure) throws IgniteSpiException {
+        @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException>
ackC) {
             GridIoMessage ioMsg = (GridIoMessage)msg;
 
-            if (!bannedClasses.contains(ioMsg.message().getClass())) {
-                super.sendMessage(node, msg, ackClosure);
-            }
+            if (!bannedClasses.contains(ioMsg.message().getClass()))
+                super.sendMessage(node, msg, ackC);
         }
     }
 }


Mime
View raw message