ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [20/23] incubator-ignite git commit: # sprint-2 fixed test to do not use old API
Date Fri, 20 Feb 2015 14:04:06 GMT
# sprint-2 fixed test to do not use old API


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

Branch: refs/heads/ignite-gg-9809
Commit: 56d278d26b8b1fcd0a6d3dd5e106ea69c9c740be
Parents: f1ec719
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Feb 20 14:35:29 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Feb 20 14:35:29 2015 +0300

----------------------------------------------------------------------
 .../GridCacheAbstractJobExecutionTest.java           | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/56d278d2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
index 6034b9f..d52b67e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.transactions.*;
 import java.util.*;
 import java.util.concurrent.atomic.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
 import static org.apache.ignite.transactions.TransactionConcurrency.*;
 import static org.apache.ignite.transactions.TransactionIsolation.*;
 
@@ -79,12 +78,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        for (int i = 0; i < GRID_CNT; i++) {
-            CacheProjection<String, int[]> cache = ((IgniteKernal)grid(i)).cache(null).flagsOn(SYNC_COMMIT).
-                projection(String.class, int[].class);
-
-            cache.localRemoveAll();
-        }
+        grid(0).jcache(null).removeAll();
 
         for (int i = 0; i < GRID_CNT; i++) {
             Ignite g = grid(i);
@@ -135,9 +129,9 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
                 private Ignite ignite;
 
                 @Override public Void applyx(final Integer i) throws IgniteCheckedException
{
-                    GridCache<String, int[]> cache = ((IgniteKernal)this.ignite).cache(null);
+                    IgniteCache<String, int[]> cache = ignite.jcache(null);
 
-                    try (Transaction tx = cache.txStart(concur, isolation)) {
+                    try (Transaction tx = ignite.transactions().txStart(concur, isolation))
{
                         int[] arr = cache.get("TestKey");
 
                         if (arr == null)
@@ -171,7 +165,8 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra
             for (int g = 0; g < GRID_CNT; g++) {
                 info("Will check grid: " + g);
 
-                GridCacheEntryEx<Object, Object> testEntry = ((IgniteKernal)grid(i)).internalCache(null).peekEx("TestKey");
+                GridCacheEntryEx<Object, Object> testEntry =
+                    ((IgniteKernal)grid(i)).internalCache(null).peekEx("TestKey");
 
                 info("Entry: " + testEntry);
             }


Mime
View raw message