ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [11/13] incubator-ignite git commit: sp-2 minor
Date Fri, 06 Mar 2015 08:01:17 GMT
sp-2 minor


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a806cdd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a806cdd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a806cdd8

Branch: refs/heads/ignite-143
Commit: a806cdd8b1d119682b8d46a9fd9ce86c3a053059
Parents: 9bc57f0
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Fri Mar 6 10:59:46 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Fri Mar 6 10:59:46 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a806cdd8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 43dc0ce..1fc71fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -2942,23 +2942,23 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         }
 
         if (txEnabled()) {
-            Transaction tx = cache.txStart();
+            try (Transaction tx = cache.txStart()) {
+                cache.replace(key, 2);
 
-            cache.replace(key, 2);
-
-            assert cache.peek(key, F.asList(GLOBAL)) == 1;
+                assert cache.peek(key, F.asList(GLOBAL)) == 1;
 
-            if (cacheMode() == LOCAL) {
-                assert cache.peek(key, F.asList(NEAR_ONLY)) == 1;
-                assert cache.peek(key, F.asList(PARTITIONED_ONLY)) == 1;
-            }
+                if (cacheMode() == LOCAL) {
+                    assert cache.peek(key, F.asList(NEAR_ONLY)) == 1;
+                    assert cache.peek(key, F.asList(PARTITIONED_ONLY)) == 1;
+                }
 
-            assert cache.peek(key, F.asList(TX)) == 2;
-            assert cache.peek(key, F.asList(SMART)) == 2;
-            assert cache.peek(key, F.asList(SWAP)) == null;
-            assert cache.peek(key, F.asList(DB)) == 1;
+                assert cache.peek(key, F.asList(TX)) == 2;
+                assert cache.peek(key, F.asList(SMART)) == 2;
+                assert cache.peek(key, F.asList(SWAP)) == null;
+                assert cache.peek(key, F.asList(DB)) == 1;
 
-            tx.commit();
+                tx.commit();
+            }
         }
         else
             cache.replace(key, 2);


Mime
View raw message