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 92C6018A12 for ; Fri, 15 May 2015 21:20:55 +0000 (UTC) Received: (qmail 57449 invoked by uid 500); 15 May 2015 21:20:55 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 57418 invoked by uid 500); 15 May 2015 21:20:55 -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 57409 invoked by uid 99); 15 May 2015 21:20:55 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2015 21:20:55 +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 0A3BDC52AB for ; Fri, 15 May 2015 21:20:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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-us-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 lkSAJX28hqP2 for ; Fri, 15 May 2015 21:20:43 +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 6FF5C258F8 for ; Fri, 15 May 2015 21:20:35 +0000 (UTC) Received: (qmail 56032 invoked by uid 99); 15 May 2015 21:20:35 -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, 15 May 2015 21:20:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3D7EDE35B7; Fri, 15 May 2015 21:20:35 +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, 15 May 2015 21:20:49 -0000 Message-Id: <82528b2e5eb84f71916069e297a24e38@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/50] [abbrv] incubator-ignite git commit: # ignite-sprint-5 minor test change # ignite-sprint-5 minor test change Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5f8925be Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5f8925be Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5f8925be Branch: refs/heads/ignite-471 Commit: 5f8925be6d6e1360ff56ff3c1dfff49811caef82 Parents: bbc21a6 Author: sboikov Authored: Wed May 13 12:38:49 2015 +0300 Committer: sboikov Committed: Wed May 13 12:38:49 2015 +0300 ---------------------------------------------------------------------- .../GridCachePartitionedTxSalvageSelfTest.java | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5f8925be/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java index 5072642..6192f39 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import org.apache.ignite.*; -import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; @@ -35,6 +34,8 @@ import org.apache.ignite.transactions.*; import java.util.*; import static org.apache.ignite.IgniteSystemProperties.*; +import static org.apache.ignite.cache.CacheMode.*; +import static org.apache.ignite.cache.CacheRebalanceMode.*; import static org.apache.ignite.transactions.TransactionConcurrency.*; import static org.apache.ignite.transactions.TransactionIsolation.*; @@ -76,10 +77,10 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes CacheConfiguration cc = defaultCacheConfiguration(); - cc.setCacheMode(CacheMode.PARTITIONED); + cc.setCacheMode(PARTITIONED); cc.setAffinity(new RendezvousAffinityFunction(false, 18)); cc.setBackups(1); - cc.setRebalanceMode(CacheRebalanceMode.SYNC); + cc.setRebalanceMode(SYNC); c.setCacheConfiguration(cc); @@ -109,8 +110,9 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { - // Shutwodn the gird. stopAllGrids(); + + System.gc(); } /** @@ -145,8 +147,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes * Check whether caches has no transactions after salvage timeout. * * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC). - * @param prepare Whether to preapre transaction state - * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}). + * @param prepare Whether to prepare transaction state + * (i.e. call {@link IgniteInternalTx#prepare()}). * @throws Exception If failed. */ private void checkSalvageAfterTimeout(TransactionConcurrency mode, boolean prepare) throws Exception { @@ -164,8 +166,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes * Check whether caches still has all transactions before salvage timeout. * * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC). - * @param prepare Whether to preapre transaction state - * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}). + * @param prepare Whether to prepare transaction state + * (i.e. call {@link IgniteInternalTx#prepare()}). * @throws Exception If failed. */ private void checkSalvageBeforeTimeout(TransactionConcurrency mode, boolean prepare) throws Exception { @@ -191,8 +193,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes * Start new transaction on the grid(0) and put some keys to it. * * @param mode Transaction mode (PESSIMISTIC, OPTIMISTIC). - * @param prepare Whether to preapre transaction state - * (i.e. call {@link org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx#prepare()}). + * @param prepare Whether to prepare transaction state + * (i.e. call {@link IgniteInternalTx#prepare()}). * @throws Exception If failed. */ private void startTxAndPutKeys(final TransactionConcurrency mode, final boolean prepare) throws Exception { @@ -210,9 +212,8 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes for (Integer key : keys) c.put(key, "val" + key); - // Unproxy. if (prepare) - U.field(tx, "tx").prepare(); + ((TransactionProxyImpl)tx).tx().prepare(); } catch (IgniteCheckedException e) { info("Failed to put keys to cache: " + e.getMessage());