Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 92EAF200CC3 for ; Sat, 10 Jun 2017 08:20:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 91CF0160BD4; Sat, 10 Jun 2017 06:20:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9A1A9160BD5 for ; Sat, 10 Jun 2017 08:20:36 +0200 (CEST) Received: (qmail 33200 invoked by uid 500); 10 Jun 2017 06:20:35 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 32873 invoked by uid 99); 10 Jun 2017 06:20:34 -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; Sat, 10 Jun 2017 06:20:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2AD33F468E; Sat, 10 Jun 2017 06:20:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Sat, 10 Jun 2017 06:20:46 -0000 Message-Id: <02ab646109a249d9b3c080d2edbe8644@git.apache.org> In-Reply-To: <41101d210221411aa053e09cda13646e@git.apache.org> References: <41101d210221411aa053e09cda13646e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/19] ignite git commit: ignite-5155 archived-at: Sat, 10 Jun 2017 06:20:37 -0000 ignite-5155 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e28efb1c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e28efb1c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e28efb1c Branch: refs/heads/ignite-5155 Commit: e28efb1c646dca7782ff65b12214e8d53101d089 Parents: acf211c Author: sboikov Authored: Fri Jun 9 17:34:57 2017 +0300 Committer: sboikov Committed: Fri Jun 9 17:34:57 2017 +0300 ---------------------------------------------------------------------- ...agnosticMessagesMultipleConnectionsTest.java | 35 --------------- .../managers/IgniteDiagnosticMessagesTest.java | 47 ++++++++++++++------ .../ignite/testsuites/IgniteBasicTestSuite.java | 2 - 3 files changed, 33 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/e28efb1c/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesMultipleConnectionsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesMultipleConnectionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesMultipleConnectionsTest.java deleted file mode 100644 index 6b77704..0000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesMultipleConnectionsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.internal.managers; - -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; - -/** - * - */ -public class IgniteDiagnosticMessagesMultipleConnectionsTest extends IgniteDiagnosticMessagesTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setConnectionsPerNode(5); - - return cfg; - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/e28efb1c/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java index d308fcc..011fdc9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/IgniteDiagnosticMessagesTest.java @@ -28,6 +28,7 @@ import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.lang.IgniteInClosure; +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; @@ -47,12 +48,18 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { /** */ private boolean client; + /** */ + private Integer connectionsPerNode; + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder); + if (connectionsPerNode != null) + ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setConnectionsPerNode(connectionsPerNode); + cfg.setClientMode(client); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -67,36 +74,48 @@ public class IgniteDiagnosticMessagesTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - super.beforeTestsStarted(); - - startGrids(3); - - client = true; + @Override protected void afterTest() throws Exception { + stopAllGrids(); - startGrid(3); + super.afterTestsStopped(); + } - startGrid(4); + /** + * @throws Exception If failed. + */ + public void testDiagnosticMessages1() throws Exception { + checkBasicDiagnosticInfo(); } - /** {@inheritDoc} */ - @Override protected void afterTestsStopped() throws Exception { - stopAllGrids(); + /** + * @throws Exception If failed. + */ + public void testDiagnosticMessages2() throws Exception { + connectionsPerNode = 5; - super.afterTestsStopped(); + checkBasicDiagnosticInfo(); } /** * @throws Exception If failed. */ - public void testDiagnosticMessages() throws Exception { + private void checkBasicDiagnosticInfo() throws Exception { + startGrids(3); + + client = true; + + startGrid(3); + + startGrid(4); + awaitPartitionMapExchange(); sendDiagnostic(); for (int i = 0; i < 5; i++) { - final IgniteCache cache = ignite(i).cache(DEFAULT_CACHE_NAME); + final IgniteCache cache = ignite(i).cache(DEFAULT_CACHE_NAME); + // Put from multiple threads to create multiple connections. GridTestUtils.runMultiThreaded(new Runnable() { @Override public void run() { for (int j = 0; j < 10; j++) http://git-wip-us.apache.org/repos/asf/ignite/blob/e28efb1c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java index cc25aca..140b1a5 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java @@ -35,7 +35,6 @@ import org.apache.ignite.internal.GridStopWithCancelSelfTest; import org.apache.ignite.internal.IgniteLocalNodeMapBeforeStartTest; import org.apache.ignite.internal.IgniteSlowClientDetectionSelfTest; import org.apache.ignite.internal.MarshallerContextLockingSelfTest; -import org.apache.ignite.internal.managers.IgniteDiagnosticMessagesMultipleConnectionsTest; import org.apache.ignite.internal.managers.IgniteDiagnosticMessagesTest; import org.apache.ignite.internal.processors.affinity.GridAffinityProcessorRendezvousSelfTest; import org.apache.ignite.internal.processors.cache.GridLocalIgniteSerializationTest; @@ -177,7 +176,6 @@ public class IgniteBasicTestSuite extends TestSuite { suite.addTestSuite(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class); suite.addTestSuite(IgniteDiagnosticMessagesTest.class); - suite.addTestSuite(IgniteDiagnosticMessagesMultipleConnectionsTest.class); return suite; }