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 3F4D218211 for ; Mon, 20 Jul 2015 15:06:17 +0000 (UTC) Received: (qmail 40705 invoked by uid 500); 20 Jul 2015 15:05:43 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 40675 invoked by uid 500); 20 Jul 2015 15:05:43 -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 40666 invoked by uid 99); 20 Jul 2015 15:05:43 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jul 2015 15:05:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A57BA189BDF for ; Mon, 20 Jul 2015 15:05:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 9kWM3myWoDd5 for ; Mon, 20 Jul 2015 15:05:29 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 464582C6CA for ; Mon, 20 Jul 2015 15:05:18 +0000 (UTC) Received: (qmail 39592 invoked by uid 99); 20 Jul 2015 15:05:18 -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; Mon, 20 Jul 2015 15:05:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 20427E0941; Mon, 20 Jul 2015 15:05:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ivasilinets@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 20 Jul 2015 15:05:38 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [22/23] incubator-ignite git commit: #ignite-1087: fix test #ignite-1087: fix 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/7e95c5fc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7e95c5fc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7e95c5fc Branch: refs/heads/ignite-1087 Commit: 7e95c5fc72885f8c7b47ab99bce709ed3d77f459 Parents: 046a6f8 Author: ivasilinets Authored: Mon Jul 13 18:52:02 2015 +0300 Committer: ivasilinets Committed: Mon Jul 13 18:52:02 2015 +0300 ---------------------------------------------------------------------- .../cache/CacheAffinityCallSelfTest.java | 27 ++++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7e95c5fc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java index b89e078..c4436ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheAffinityCallSelfTest.java @@ -18,6 +18,7 @@ package org.apache.ignite.internal.processors.cache; import org.apache.ignite.*; +import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; @@ -79,6 +80,11 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest { return cfg; } + /** {@inheritDoc} */ + @Override protected void afterTest() throws Exception { + stopAllGrids(); + } + /** * @throws Exception If failed. */ @@ -121,14 +127,19 @@ public class CacheAffinityCallSelfTest extends GridCommonAbstractTest { } }); - GridTestUtils.assertThrows(log, new Callable() { - @Override public Object call() throws Exception { - while (!fut.isDone()) - client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key)); - - return null; - } - }, ComputeTaskCancelledException.class, null); + try { + while (!fut.isDone()) + client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key)); + } + catch (ComputeTaskCancelledException e) { + assertTrue(e.getMessage().contains("stopping")); + } + catch(ClusterGroupEmptyException e) { + assertTrue(e.getMessage().contains("Topology projection is empty")); + } + catch(IgniteException e) { + assertTrue(e.getMessage().contains("cache (or node) is stopping")); + } stopGrid(SERVERS_COUNT); }