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 C723618894 for ; Thu, 11 Jun 2015 18:18:17 +0000 (UTC) Received: (qmail 31903 invoked by uid 500); 11 Jun 2015 18:18:17 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 31871 invoked by uid 500); 11 Jun 2015 18:18:17 -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 31857 invoked by uid 99); 11 Jun 2015 18:18:17 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2015 18:18:17 +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 461A3C095F for ; Thu, 11 Jun 2015 18:18:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.791 X-Spam-Level: * X-Spam-Status: No, score=1.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, 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 MOVwQF6buicX for ; Thu, 11 Jun 2015 18:18:02 +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 3B17925F1E for ; Thu, 11 Jun 2015 18:18:01 +0000 (UTC) Received: (qmail 30808 invoked by uid 99); 11 Jun 2015 18:17:59 -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; Thu, 11 Jun 2015 18:17:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A5082E0A05; Thu, 11 Jun 2015 18:17:59 +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: Thu, 11 Jun 2015 18:18:05 -0000 Message-Id: In-Reply-To: <19398bda81bd488b94841203deba91d0@git.apache.org> References: <19398bda81bd488b94841203deba91d0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [7/8] incubator-ignite git commit: # GG-10052: corrected logic to check Spi sizes. # GG-10052: corrected logic to check Spi sizes. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6ad37e14 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6ad37e14 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6ad37e14 Branch: refs/heads/ignite-gg-10249 Commit: 6ad37e14f11e7ddd7d858ac0ba186bb3f7db8d02 Parents: 1048d55 Author: iveselovskiy Authored: Thu Jun 11 21:13:21 2015 +0300 Committer: iveselovskiy Committed: Thu Jun 11 21:13:21 2015 +0300 ---------------------------------------------------------------------- .../cache/GridCacheSwapReloadSelfTest.java | 21 ++++++++++++++++---- .../cache/IgniteCachePeekModesAbstractTest.java | 4 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ad37e14/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java index 5c0797b..501b299 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapReloadSelfTest.java @@ -61,6 +61,15 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest { return swap; } + /** + * Answers if to check #count() & #size() for Spi. + * (Some implementations cannot count sizes.) + * @return If to check size. + */ + protected boolean isCheckSize() { + return true; + } + /** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -147,8 +156,10 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest { assert swapLatch.await(1, SECONDS); Thread.sleep(100); -// assert swap().count(spaceName()) == 1; -// assert swap().size(spaceName()) > 0; + if (isCheckSize()) { + assert swap().count(spaceName()) == 1; + assert swap().size(spaceName()) > 0; + } load(cache, "key", true); @@ -202,8 +213,10 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest { assert swapLatch.await(1, SECONDS); Thread.sleep(100); -// assert swap().count(spaceName()) == 2; -// assert swap().size(spaceName()) > 0 : swap().size(spaceName()); + if (isCheckSize()) { + assert swap().count(spaceName()) == 2; + assert swap().size(spaceName()) > 0 : swap().size(spaceName()); + } loadAll(cache, ImmutableSet.of("key1", "key2"), true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6ad37e14/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java index 20023b5..515eba4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java @@ -362,7 +362,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra * (Some implementations cannot count sizes.) * @return If to check size. */ - protected boolean isCheckSizes() { + protected boolean isCheckSize() { return true; } @@ -370,7 +370,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra * @throws Exception If failed. */ public void testSize() throws Exception { - if (!isCheckSizes()) + if (!isCheckSize()) return; checkEmpty();