Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7689417438 for ; Fri, 17 Jul 2015 06:28:29 +0000 (UTC) Received: (qmail 23748 invoked by uid 500); 17 Jul 2015 06:28:29 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 23718 invoked by uid 500); 17 Jul 2015 06:28:29 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 23669 invoked by uid 99); 17 Jul 2015 06:28:29 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 06:28:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E4ACDC0098 for ; Fri, 17 Jul 2015 06:28:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.791 X-Spam-Level: X-Spam-Status: No, score=0.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Zpfy9gxgJihX for ; Fri, 17 Jul 2015 06:28:15 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 15C572142E for ; Fri, 17 Jul 2015 06:28:13 +0000 (UTC) Received: (qmail 22396 invoked by uid 99); 17 Jul 2015 06:28:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 06:28:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 33060E3CA8; Fri, 17 Jul 2015 06:28:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Fri, 17 Jul 2015 06:28:21 -0000 Message-Id: <0a83cd63b5a74f0cbf4f07a6bc863193@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/50] [abbrv] incubator-ignite git commit: fix fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dda77273 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dda77273 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dda77273 Branch: refs/heads/ignite-752 Commit: dda77273b382fbafb96f3710beb514451189e4c5 Parents: cddbed5 Author: Denis Magda Authored: Mon Jul 13 19:08:11 2015 +0300 Committer: Denis Magda Committed: Mon Jul 13 19:08:11 2015 +0300 ---------------------------------------------------------------------- .../communication/tcp/TcpCommunicationSpi.java | 7 +- .../tcp/TcpDiscoveryMultiThreadedTest.java | 77 ++------------------ 2 files changed, 9 insertions(+), 75 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dda77273/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java index f62cdd4..dcc7037 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java @@ -2066,7 +2066,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter client = null; } - onException("Handshake timedout (will retry with increased timeout) [timeout=" + connTimeout0 + + onException("Handshake timeout (will retry with increased timeout) [timeout=" + connTimeout0 + ", addr=" + addr + ']', e); if (log.isDebugEnabled()) @@ -2100,8 +2100,9 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter } } catch (Exception e) { - if (!getSpiContext().localNode().isClient() && node.isClient()) - getSpiContext().tryFailNode(node.id(), "Killing client"); + if (X.hasCause(e, HandshakeFailureException.class) && node.isClient() && + !getSpiContext().isStopping()) + getSpiContext().tryFailNode(node.id(), "Killing client: " + e.getMessage()); if (client != null) { client.forceClose(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dda77273/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java index 169a8b5..61fe95d 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java @@ -37,10 +37,10 @@ import static org.apache.ignite.events.EventType.*; */ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest { /** */ - private static final int GRID_CNT = 4; + private static final int GRID_CNT = 5; /** */ - private static final int CLIENT_GRID_CNT = 1; + private static final int CLIENT_GRID_CNT = 5; /** */ private static final ThreadLocal clientFlagPerThread = new ThreadLocal<>(); @@ -102,7 +102,9 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest { * @throws Exception If any error occurs. */ public void testMultiThreaded() throws Exception { - execute2(); + //fail("https://issues.apache.org/jira/browse/IGNITE-1100"); + + execute(); } /** @@ -164,75 +166,6 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - private void execute2() throws Exception { - info("Test timeout: " + (getTestTimeout() / (60 * 1000)) + " min."); - - startGridsMultiThreaded(GRID_CNT); - - clientFlagGlobal = true; - - startGridsMultiThreaded(GRID_CNT, CLIENT_GRID_CNT); - - final AtomicBoolean done = new AtomicBoolean(); - - final AtomicInteger clientIdx = new AtomicInteger(GRID_CNT); - - IgniteInternalFuture fut1 = multithreadedAsync( - new Callable() { - @Override public Object call() throws Exception { - clientFlagPerThread.set(true); - - int idx = clientIdx.getAndIncrement(); - - while (!done.get()) { - stopGrid(idx); - //assertTrue(stopGrid(idx, true)); - startGrid(idx); - } - - return null; - } - }, - 1 - ); - - final BlockingQueue srvIdx = new LinkedBlockingQueue<>(); - - for (int i = 0; i < GRID_CNT; i++) - srvIdx.add(i); - - IgniteInternalFuture fut2 = multithreadedAsync( - new Callable() { - @Override public Object call() throws Exception { - clientFlagPerThread.set(false); - - while (!done.get()) { - int idx = srvIdx.take(); - - stopGrid(idx); - //assertTrue(stopGrid(idx, true)); - startGrid(idx); - - srvIdx.add(idx); - } - - return null; - } - }, - GRID_CNT - 1 - ); - - Thread.sleep(getTestTimeout() - 60 * 1000); - - done.set(true); - - fut1.get(); - fut2.get(); - } - - /** - * @throws Exception If failed. - */ private void execute() throws Exception { info("Test timeout: " + (getTestTimeout() / (60 * 1000)) + " min.");