ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/11] incubator-ignite git commit: # IGNITE-709 Fix hang sests: set joinTimeout for discovery SPI.
Date Tue, 19 May 2015 19:39:58 GMT
# IGNITE-709 Fix hang sests: set joinTimeout for discovery SPI.


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

Branch: refs/heads/ignite-23
Commit: c3744ba8fc571f0ec385b1e3cd1f972973250cb5
Parents: 7d64902
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon May 18 20:04:28 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon May 18 20:04:28 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/testframework/junits/GridAbstractTest.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c3744ba8/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index dd7073d..294595d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -676,9 +676,11 @@ public abstract class GridAbstractTest extends TestCase {
     protected IgniteConfiguration optimize(IgniteConfiguration cfg) throws IgniteCheckedException
{
         // TODO: IGNITE-605: propose another way to avoid network overhead in tests.
         if (cfg.getLocalHost() == null) {
-            if (cfg.getDiscoverySpi() instanceof TcpDiscoverySpi
-                || cfg.getDiscoverySpi() instanceof TcpClientDiscoverySpi)
+            if (cfg.getDiscoverySpi() instanceof TcpDiscoverySpiAdapter) {
                 cfg.setLocalHost("127.0.0.1");
+
+                ((TcpDiscoverySpiAdapter)cfg.getDiscoverySpi()).setJoinTimeout(5000);
+            }
             else
                 cfg.setLocalHost(getTestResources().getLocalHost());
         }


Mime
View raw message