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 AE83117C73 for ; Wed, 1 Apr 2015 08:32:45 +0000 (UTC) Received: (qmail 11482 invoked by uid 500); 1 Apr 2015 08:32:45 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 11444 invoked by uid 500); 1 Apr 2015 08:32:45 -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 11399 invoked by uid 99); 1 Apr 2015 08:32:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 08:32:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Apr 2015 08:32:23 +0000 Received: (qmail 10242 invoked by uid 99); 1 Apr 2015 08:32:20 -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; Wed, 01 Apr 2015 08:32:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0AF65E2F3C; Wed, 1 Apr 2015 08:32:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akuznetsov@apache.org To: commits@ignite.incubator.apache.org Date: Wed, 01 Apr 2015 08:32:55 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [37/50] incubator-ignite git commit: # ignite-654 fixed test X-Virus-Checked: Checked by ClamAV on apache.org # ignite-654 fixed test Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/05c8d203 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/05c8d203 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/05c8d203 Branch: refs/heads/ignite-639 Commit: 05c8d2039f41c53a64136d3268c5809aba2ef7d4 Parents: 41963b7 Author: sboikov Authored: Tue Mar 31 16:37:27 2015 +0300 Committer: sboikov Committed: Tue Mar 31 16:37:27 2015 +0300 ---------------------------------------------------------------------- .../cache/GridCachePutAllFailoverSelfTest.java | 26 ++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/05c8d203/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java index 1b3dd2e..4b5c250 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java @@ -40,6 +40,7 @@ import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; +import static org.apache.ignite.cache.CachePeekMode.*; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*; /** @@ -50,7 +51,7 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** Size of the test map. */ - private static final int TEST_MAP_SIZE = 30000; + private static final int TEST_MAP_SIZE = 30_000; /** Cache name. */ private static final String CACHE_NAME = "partitioned"; @@ -339,12 +340,18 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { int primaryCacheSize = 0; for (Ignite g : runningWorkers) { - info(">>>>> " + g.cache(CACHE_NAME).localSize()); + info("Cache size [node=" + g.name() + + ", localSize=" + g.cache(CACHE_NAME).localSize() + + ", localPrimarySize=" + g.cache(CACHE_NAME).localSize(PRIMARY) + + ']'); primaryCacheSize += ((IgniteKernal)g).internalCache(CACHE_NAME).primarySize(); } assertEquals(TEST_MAP_SIZE, primaryCacheSize); + + for (Ignite g : runningWorkers) + assertEquals(TEST_MAP_SIZE, g.cache(CACHE_NAME).size(PRIMARY)); } finally { stopAllGrids(); @@ -388,9 +395,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { } try { - // Dummy call to fetch affinity function from remote node - master.cluster().mapKeyToNode(CACHE_NAME, "Dummy"); - Map> dataChunks = new HashMap<>(); int chunkCntr = 0; @@ -539,12 +543,18 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { int primaryCacheSize = 0; for (Ignite g : runningWorkers) { - info(">>>>> " + g.cache(CACHE_NAME).localSize()); + info("Cache size [node=" + g.name() + + ", localSize=" + g.cache(CACHE_NAME).localSize() + + ", localPrimarySize=" + g.cache(CACHE_NAME).localSize(PRIMARY) + + ']'); - primaryCacheSize += ((IgniteKernal)g).internalCache(CACHE_NAME).primarySize(); + primaryCacheSize += g.cache(CACHE_NAME).localSize(PRIMARY); } assertEquals(TEST_MAP_SIZE, primaryCacheSize); + + for (Ignite g : runningWorkers) + assertEquals(TEST_MAP_SIZE, g.cache(CACHE_NAME).size(PRIMARY)); } finally { stopAllGrids(); @@ -602,6 +612,8 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest { cfg.setDiscoverySpi(discoverySpi); if (gridName.startsWith("master")) { + cfg.setClientMode(true); + cfg.setUserAttributes(ImmutableMap.of("segment", "master")); // For sure.