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 AFFF3200CEC for ; Mon, 31 Jul 2017 10:56:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AEDEA164C10; Mon, 31 Jul 2017 08:56:53 +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 8EF2B164C1F for ; Mon, 31 Jul 2017 10:56:52 +0200 (CEST) Received: (qmail 69679 invoked by uid 500); 31 Jul 2017 08:56:51 -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 68733 invoked by uid 99); 31 Jul 2017 08:56:49 -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, 31 Jul 2017 08:56:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B5BEAE9635; Mon, 31 Jul 2017 08:56:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Mon, 31 Jul 2017 08:56:59 -0000 Message-Id: <59362530934d4d6e8e0461a3310fda4b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [13/26] ignite git commit: IGNITE-5729 Added proper exception handling to test. Fixed test. archived-at: Mon, 31 Jul 2017 08:56:53 -0000 IGNITE-5729 Added proper exception handling to test. Fixed test. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f975110f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f975110f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f975110f Branch: refs/heads/ignite-5757 Commit: f975110f54cb08fcf85c09ec67eb0a5b45c429e5 Parents: 591566e Author: Pavel Kovalenko Authored: Fri Jul 28 16:50:35 2017 +0300 Committer: Pavel Kovalenko Committed: Fri Jul 28 16:50:35 2017 +0300 ---------------------------------------------------------------------- .../processors/cache/IgniteCacheGroupsTest.java | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/f975110f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java index b55e3d0..468bbc8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGroupsTest.java @@ -2872,13 +2872,25 @@ public class IgniteCacheGroupsTest extends GridCommonAbstractTest { ThreadLocalRandom rnd = ThreadLocalRandom.current(); while (!stop.get()) { - String grp = rnd.nextBoolean() ? GROUP1 : GROUP2; - int cacheIdx = rnd.nextInt(CACHES); + try { + String grp = rnd.nextBoolean() ? GROUP1 : GROUP2; + int cacheIdx = rnd.nextInt(CACHES); - IgniteCache cache = node.cache(grp + "-" + cacheIdx); + IgniteCache cache = node.cache(grp + "-" + cacheIdx); - for (int i = 0; i < 10; i++) - cacheOperation(rnd, cache); + for (int i = 0; i < 10; i++) + cacheOperation(rnd, cache); + } + catch (Exception e) { + if (X.hasCause(e, CacheStoppedException.class)) { + // Cache operation can be blocked on + // awaiting new topology version and cancelled with CacheStoppedException cause. + + continue; + } + + throw e; + } } } catch (Exception e) {