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 0394E173A6 for ; Wed, 27 May 2015 16:13:50 +0000 (UTC) Received: (qmail 84783 invoked by uid 500); 27 May 2015 16:13:49 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 84746 invoked by uid 500); 27 May 2015 16:13:49 -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 84730 invoked by uid 99); 27 May 2015 16:13:49 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 16:13:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6C8CCC91CA for ; Wed, 27 May 2015 16:13:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.229 X-Spam-Level: X-Spam-Status: No, score=-4.229 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id At8nXFow8M33 for ; Wed, 27 May 2015 16:13:41 +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 B61A728311 for ; Wed, 27 May 2015 16:13:26 +0000 (UTC) Received: (qmail 80326 invoked by uid 99); 27 May 2015 16:13:21 -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, 27 May 2015 16:13:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3B113E0508; Wed, 27 May 2015 16:13:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yzhdanov@apache.org To: commits@ignite.incubator.apache.org Date: Wed, 27 May 2015 16:14:06 -0000 Message-Id: In-Reply-To: <522f61f41f694ce0a455e8c937becb2c@git.apache.org> References: <522f61f41f694ce0a455e8c937becb2c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [47/50] [abbrv] incubator-ignite git commit: # ignite-23 # ignite-23 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9188f4ed Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9188f4ed Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9188f4ed Branch: refs/heads/ignite-943 Commit: 9188f4ed312d4a0289a3c2b63ebe478341be6424 Parents: cf6c420 Author: sboikov Authored: Wed May 27 16:51:07 2015 +0300 Committer: sboikov Committed: Wed May 27 17:01:14 2015 +0300 ---------------------------------------------------------------------- ...niteCacheClientNodeChangingTopologyTest.java | 29 ++++++++++++++++++-- .../junits/common/GridCommonAbstractTest.java | 2 +- 2 files changed, 27 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9188f4ed/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java index e13b283..47c1d7e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java @@ -29,6 +29,7 @@ import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.apache.ignite.internal.processors.cache.version.*; +import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.plugin.extensions.communication.*; @@ -851,8 +852,8 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac ccfg.setRebalanceMode(SYNC); ccfg.setNearConfiguration(nearCfg); - IgniteEx ignite0 = startGrid(0); - IgniteEx ignite1 = startGrid(1); + final IgniteEx ignite0 = startGrid(0); + final IgniteEx ignite1 = startGrid(1); client = true; @@ -920,10 +921,32 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac lockFut.get(); + boolean wait = GridTestUtils.waitForCondition(new GridAbsPredicate() { + @Override public boolean apply() { + return unlocked(ignite0) && unlocked(ignite1); + } + + private boolean unlocked(Ignite ignite) { + IgniteCache cache = ignite.cache(null); + + for (Integer key : keys) { + if (cache.isLocalLocked(key, false)) { + log.info("Key is locked [key=" + key + ", node=" + ignite.name() + ']'); + + return false; + } + } + + return true; + } + }, 10_000); + + assertTrue(wait); + for (Integer key : keys) { Lock lock = cache0.lock(key); - assertTrue(lock.tryLock()); + assertTrue("Failed to lock: " + key, lock.tryLock()); lock.unlock(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9188f4ed/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java index a4d3355..1f4c7b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java @@ -391,7 +391,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest { if (i == 0) start = System.currentTimeMillis(); - if (i >= 50) + if (System.currentTimeMillis() - start > 30_000) throw new IgniteException("Timeout of waiting for topology map update [grid=" + g.name() + ", p=" + p + ", nodes=" + exp + ", owners=" + actual + ", affNodes=" + affNodes + ", owners=" + owners + ", locNode="