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 516EB18A91 for ; Fri, 24 Apr 2015 09:00:33 +0000 (UTC) Received: (qmail 35257 invoked by uid 500); 24 Apr 2015 09:00:33 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 35190 invoked by uid 500); 24 Apr 2015 09:00:33 -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 35171 invoked by uid 99); 24 Apr 2015 09:00:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 09:00:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Apr 2015 09:00:28 +0000 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 7746F215EF for ; Fri, 24 Apr 2015 09:00:08 +0000 (UTC) Received: (qmail 28231 invoked by uid 99); 24 Apr 2015 08:58:53 -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; Fri, 24 Apr 2015 08:58:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0CA94E0EB5; Fri, 24 Apr 2015 08:58:53 +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: Fri, 24 Apr 2015 08:58:53 -0000 Message-Id: <3a88c55bb9414c308f38614d6e8bede2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/50] incubator-ignite git commit: # Improve generation of node ID for test nodes. X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-ignite Updated Branches: refs/heads/ignite-424 0995cdf1a -> 38db16b46 # Improve generation of node ID for test nodes. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/702f1721 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/702f1721 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/702f1721 Branch: refs/heads/ignite-424 Commit: 702f1721a5b3e50089bb6183bda0ba00094ca729 Parents: 4e7a691 Author: sevdokimov Authored: Wed Apr 22 11:48:06 2015 +0300 Committer: sevdokimov Committed: Wed Apr 22 11:48:06 2015 +0300 ---------------------------------------------------------------------- .../testframework/junits/GridAbstractTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/702f1721/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java index a6ada3d..d5c0d44 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java @@ -985,6 +985,21 @@ public abstract class GridAbstractTest extends TestCase { cfg.setNodeId(null); + if (gridName.matches(".*\\d")) { + String idStr = UUID.randomUUID().toString(); + + char[] chars = idStr.toCharArray(); + + chars[0] = gridName.charAt(gridName.length() - 1); + chars[1] = '0'; + + chars[chars.length - 3] = '0'; + chars[chars.length - 2] = '0'; + chars[chars.length - 1] = gridName.charAt(gridName.length() - 1); + + cfg.setNodeId(UUID.fromString(new String(chars))); + } + return cfg; }