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 2350A18D1B for ; Fri, 12 Jun 2015 14:14:47 +0000 (UTC) Received: (qmail 96073 invoked by uid 500); 12 Jun 2015 14:14:44 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 96041 invoked by uid 500); 12 Jun 2015 14:14:44 -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 96032 invoked by uid 99); 12 Jun 2015 14:14:44 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2015 14:14:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8005F1A546B for ; Fri, 12 Jun 2015 14:14:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5vupLXm9lcm8 for ; Fri, 12 Jun 2015 14:14:35 +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 422E724CE8 for ; Fri, 12 Jun 2015 14:14:34 +0000 (UTC) Received: (qmail 88264 invoked by uid 99); 12 Jun 2015 14:13: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; Fri, 12 Jun 2015 14:13:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 53DBEDFF09; Fri, 12 Jun 2015 14:13:18 +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, 12 Jun 2015 14:13:18 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-ignite git commit: Fixed test. Cache doesn't start in transaction. Repository: incubator-ignite Updated Branches: refs/heads/ignite-classname fe1750d3f -> e17a2be1b Fixed test. Cache doesn't start in transaction. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e158c90f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e158c90f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e158c90f Branch: refs/heads/ignite-classname Commit: e158c90fe58082e00d97f26c5bb3ae450906fc6a Parents: fe1750d Author: nikolay_tikhonov Authored: Fri Jun 12 17:11:27 2015 +0300 Committer: nikolay_tikhonov Committed: Fri Jun 12 17:11:27 2015 +0300 ---------------------------------------------------------------------- .../cache/IgniteCacheP2pUnmarshallingTxErrorTest.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e158c90f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java index a4e2753..017f7db 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingTxErrorTest.java @@ -50,9 +50,12 @@ public class IgniteCacheP2pUnmarshallingTxErrorTest extends IgniteCacheP2pUnmars * Sends put with optimistic lock and handles fail. */ protected void failOptimistic() { - try (Transaction tx = grid(0).transactions().txStart(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.REPEATABLE_READ)) { + IgniteCache cache = jcache(0); - jcache(0).put(new TestKey(String.valueOf(++key)), ""); + try (Transaction tx = grid(0).transactions().txStart(TransactionConcurrency.OPTIMISTIC, + TransactionIsolation.REPEATABLE_READ)) { + + cache.put(new TestKey(String.valueOf(++key)), ""); tx.commit(); @@ -69,9 +72,12 @@ public class IgniteCacheP2pUnmarshallingTxErrorTest extends IgniteCacheP2pUnmars * Sends put with pessimistic lock and handles fail. */ protected void failPessimictic() { - try (Transaction tx = grid(0).transactions().txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ)) { + IgniteCache cache = jcache(0); + + try (Transaction tx = grid(0).transactions().txStart(TransactionConcurrency.PESSIMISTIC, + TransactionIsolation.REPEATABLE_READ)) { - jcache(0).put(new TestKey(String.valueOf(++key)), ""); + cache.put(new TestKey(String.valueOf(++key)), ""); assert false : "p2p marshalling failed, but error response was not sent"; }