ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [06/35] incubator-ignite git commit: IGNITE-96 Changed tests on client module to JCache API.
Date Tue, 10 Feb 2015 16:15:50 GMT
IGNITE-96 Changed tests on client module to JCache 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/604a6803
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/604a6803
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/604a6803

Branch: refs/heads/ignite-96
Commit: 604a6803aff02c0a041ae1f47afb0da25612f2cb
Parents: 03d0282
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Mon Feb 9 17:11:06 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Mon Feb 9 17:11:19 2015 +0300

----------------------------------------------------------------------
 ...idHibernateL2CacheConfigurationSelfTest.java | 36 ++++++++++++------
 .../tests/ScalarCacheProjectionSpec.scala       | 39 --------------------
 .../p2p/GridP2PUserVersionChangeSelfTest.java   | 23 +++++++++---
 .../spring/GridSpringCacheManagerSelfTest.java  | 23 ++++++------
 .../GridSpringDynamicCacheManagerSelfTest.java  | 11 +++---
 .../cache/VisorCacheClearCommandSpec.scala      | 16 +++++---
 .../commands/cache/VisorCacheCommandSpec.scala  |  2 +-
 .../cache/VisorCacheCompactCommandSpec.scala    |  8 ++--
 .../cswap/VisorCacheSwapCommandSpec.scala       |  4 +-
 .../internal/websession/WebSessionSelfTest.java |  4 +-
 10 files changed, 80 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
index a9393bb..f9ef6db 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.cache.hibernate;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -28,6 +29,7 @@ import org.hibernate.cache.spi.access.AccessType;
 import org.hibernate.cfg.*;
 import org.hibernate.service.*;
 
+import javax.cache.Cache;
 import javax.persistence.*;
 import java.util.*;
 
@@ -232,17 +234,17 @@ public class GridHibernateL2CacheConfigurationSelfTest extends GridCommonAbstrac
                 ses.close();
             }
 
-            GridCache<Object, Object> cache1 = grid(0).cache("cache1");
-            GridCache<Object, Object> cache2 = grid(0).cache("cache2");
-            GridCache<Object, Object> cache3 = grid(0).cache("cache3");
-            GridCache<Object, Object> cacheE3 = grid(0).cache(ENTITY3_NAME);
-            GridCache<Object, Object> cacheE4 = grid(0).cache(ENTITY4_NAME);
-
-            assertEquals("Unexpected entries: " + cache1.entrySet(), expCache1, cache1.size());
-            assertEquals("Unexpected entries: " + cache2.entrySet(), expCache2, cache2.size());
-            assertEquals("Unexpected entries: " + cache3.entrySet(), expCache3, cache3.size());
-            assertEquals("Unexpected entries: " + cacheE3.entrySet(), expCacheE3, cacheE3.size());
-            assertEquals("Unexpected entries: " + cacheE4.entrySet(), expCacheE4, cacheE4.size());
+            IgniteCache<Object, Object> cache1 = grid(0).jcache("cache1");
+            IgniteCache<Object, Object> cache2 = grid(0).jcache("cache2");
+            IgniteCache<Object, Object> cache3 = grid(0).jcache("cache3");
+            IgniteCache<Object, Object> cacheE3 = grid(0).jcache(ENTITY3_NAME);
+            IgniteCache<Object, Object> cacheE4 = grid(0).jcache(ENTITY4_NAME);
+
+            assertEquals("Unexpected entries: " + toSet(cache1.iterator()), expCache1, cache1.size());
+            assertEquals("Unexpected entries: " + toSet(cache2.iterator()), expCache2, cache2.size());
+            assertEquals("Unexpected entries: " + toSet(cache3.iterator()), expCache3, cache3.size());
+            assertEquals("Unexpected entries: " + toSet(cacheE3.iterator()), expCacheE3,
cacheE3.size());
+            assertEquals("Unexpected entries: " + toSet(cacheE4.iterator()), expCacheE4,
cacheE4.size());
         }
         finally {
             sesFactory.close();
@@ -250,6 +252,18 @@ public class GridHibernateL2CacheConfigurationSelfTest extends GridCommonAbstrac
     }
 
     /**
+     *
+     */
+    private <K, V> Set<Cache.Entry<K, V>> toSet(Iterator<Cache.Entry<K,
V>> iter){
+        Set<Cache.Entry<K, V>> set = new HashSet<>();
+
+        while (iter.hasNext())
+            set.add(iter.next());
+
+        return set;
+    }
+
+    /**
      * @param gridName Name of the grid providing caches.
      * @return Session factory.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheProjectionSpec.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheProjectionSpec.scala
b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheProjectionSpec.scala
deleted file mode 100644
index c88b5ea..0000000
--- a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheProjectionSpec.scala
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.scalar.tests
-
-import org.apache.ignite.scalar.scalar
-import org.apache.ignite.scalar.scalar._
-import org.junit.runner.RunWith
-import org.scalatest.FlatSpec
-import org.scalatest.junit.JUnitRunner
-
-/**
- * Test for using grid.cache(..).projection(...) from scala code.
- */
-@RunWith(classOf[JUnitRunner])
-class ScalarCacheProjectionSpec extends FlatSpec {
-    behavior of "Cache projection"
-
-    it should "work properly via grid.cache(...).viewByType(...)" in scalar("examples/config/example-cache.xml")
{
-        val cache = ignite$.cache("local").viewByType(classOf[String], classOf[Int])
-
-        assert(cache.putx("1", 1))
-        assert(cache.get("1") == 1)
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java
b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java
index 740fc1f..8292223 100644
--- a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java
@@ -30,6 +30,7 @@ import org.apache.ignite.testframework.*;
 import org.apache.ignite.testframework.config.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import javax.cache.*;
 import java.net.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -289,13 +290,13 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest
{
 
             Class rcrsCls = ldr.loadClass(TEST_RCRS_NAME);
 
-            GridCache<Long, Object> cache1 = ignite1.cache(null);
+            IgniteCache<Long, Object> cache1 = ignite1.jcache(null);
 
             assertNotNull(cache1);
 
             cache1.put(1L, rcrsCls.newInstance());
 
-            final GridCache<Long, Object> cache2 = ignite2.cache(null);
+            final IgniteCache<Long, Object> cache2 = ignite2.jcache(null);
 
             assertNotNull(cache2);
 
@@ -315,7 +316,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest
{
 
             ignite1 = startGrid("testCacheRedeployVersionChangeContinuousMode1");
 
-            cache1 = ignite1.cache(null);
+            cache1 = ignite1.jcache(null);
 
             assertNotNull(cache1);
 
@@ -328,8 +329,8 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest
{
                 @Override public boolean applyx() throws IgniteCheckedException {
                     return cache2.get(1L) == null;
                 }
-            }, getConditionTimeout()) : "2nd condition failed [entries1=" + cache1.entrySet()
+
-                ", entries2=" + cache2.entrySet() + ']';
+            }, getConditionTimeout()) : "2nd condition failed [entries1=" + toSet(cache1.iterator())
+
+                ", entries2=" + toSet(cache2.iterator()) + ']';
         }
         finally {
             stopAllGrids();
@@ -337,6 +338,18 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
+     *
+     */
+    private <K, V> Set<Cache.Entry<K, V>> toSet(Iterator<Cache.Entry<K,
V>> iter){
+        Set<Cache.Entry<K, V>> set = new HashSet<>();
+
+        while (iter.hasNext())
+            set.add(iter.next());
+
+        return set;
+    }
+
+    /**
      * Creates content of META-INF/ignite.xml for specified user version.
      *
      * @param userVer Version to create.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringCacheManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringCacheManagerSelfTest.java
b/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringCacheManagerSelfTest.java
index 1d888c4..926f575c 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringCacheManagerSelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringCacheManagerSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.spring;
 
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -84,7 +85,7 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid().cache(CACHE_NAME).removeAll();
+        grid().jcache(CACHE_NAME).removeAll();
     }
 
     /**
@@ -98,7 +99,7 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
 
         assertEquals(3, svc.called());
 
-        GridCache<Integer, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<Integer, String> c = grid().jcache(CACHE_NAME);
 
         assertEquals(3, c.size());
 
@@ -117,7 +118,7 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
 
         assertEquals(3, svc.called());
 
-        GridCache<GridSpringCacheTestKey, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<GridSpringCacheTestKey, String> c = grid().jcache(CACHE_NAME);
 
         assertEquals(3, c.size());
 
@@ -129,7 +130,7 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testSimpleKeyPut() throws Exception {
-        GridCache<Integer, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<Integer, String> c = grid().jcache(CACHE_NAME);
 
         for (int i = 0; i < 3; i++) {
             assertEquals("value" + i + "odd", svc.simpleKeyPut(i));
@@ -150,7 +151,7 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testComplexKeyPut() throws Exception {
-        GridCache<GridSpringCacheTestKey, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<GridSpringCacheTestKey, String> c = grid().jcache(CACHE_NAME);
 
         for (int i = 0; i < 3; i++) {
             assertEquals("value" + i + "suffix" + i + "odd", svc.complexKeyPut(i, "suffix"
+ i));
@@ -171,10 +172,10 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testSimpleKeyEvict() throws Exception {
-        GridCache<Integer, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<Integer, String> c = grid().jcache(CACHE_NAME);
 
         for (int i = 0; i < 3; i++)
-            c.putx(i, "value" + i);
+            c.put(i, "value" + i);
 
         assertEquals(3, c.size());
 
@@ -195,10 +196,10 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testComplexKeyEvict() throws Exception {
-        GridCache<GridSpringCacheTestKey, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<GridSpringCacheTestKey, String> c = grid().jcache(CACHE_NAME);
 
         for (int i = 0; i < 3; i++)
-            c.putx(new GridSpringCacheTestKey(i, "suffix" + i), "value" + i);
+            c.put(new GridSpringCacheTestKey(i, "suffix" + i), "value" + i);
 
         assertEquals(3, c.size());
 
@@ -219,10 +220,10 @@ public class GridSpringCacheManagerSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testEvictAll() throws Exception {
-        GridCache<Integer, String> c = grid().cache(CACHE_NAME);
+        IgniteCache<Integer, String> c = grid().jcache(CACHE_NAME);
 
         for (int i = 0; i < 3; i++)
-            c.putx(i, "value" + i);
+            c.put(i, "value" + i);
 
         assertEquals(3, c.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringDynamicCacheManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringDynamicCacheManagerSelfTest.java
b/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringDynamicCacheManagerSelfTest.java
index febcaaf..dd3bf27 100644
--- a/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringDynamicCacheManagerSelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/spring/GridSpringDynamicCacheManagerSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.spring;
 
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.spring.*;
 import org.apache.ignite.configuration.*;
@@ -91,7 +92,7 @@ public class GridSpringDynamicCacheManagerSelfTest extends GridCommonAbstractTes
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid().cache(DATA_CACHE_NAME).removeAll();
+        grid().jcache(DATA_CACHE_NAME).removeAll();
     }
 
     /**
@@ -109,7 +110,7 @@ public class GridSpringDynamicCacheManagerSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testCacheAndEvict() throws Exception {
-        GridCache<Object, String> c = grid().cache(DATA_CACHE_NAME);
+        IgniteCache<Object, String> c = grid().jcache(DATA_CACHE_NAME);
 
         assertEquals("value1", svc.cacheable(1));
 
@@ -130,7 +131,7 @@ public class GridSpringDynamicCacheManagerSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testPutAndEvict() throws Exception {
-        GridCache<Object, String> c = grid().cache(DATA_CACHE_NAME);
+        IgniteCache<Object, String> c = grid().jcache(DATA_CACHE_NAME);
 
         assertEquals("value1", svc.cachePut(1));
 
@@ -151,7 +152,7 @@ public class GridSpringDynamicCacheManagerSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testCacheAndEvictAll() throws Exception {
-        GridCache<Object, String> c = grid().cache(DATA_CACHE_NAME);
+        IgniteCache<Object, String> c = grid().jcache(DATA_CACHE_NAME);
 
         assertEquals("value1", svc.cacheable(1));
         assertEquals("value2", svc.cacheable(2));
@@ -178,7 +179,7 @@ public class GridSpringDynamicCacheManagerSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testPutAndEvictAll() throws Exception {
-        GridCache<Object, String> c = grid().cache(DATA_CACHE_NAME);
+        IgniteCache<Object, String> c = grid().jcache(DATA_CACHE_NAME);
 
         assertEquals("value1", svc.cachePut(1));
         assertEquals("value2", svc.cachePut(2));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala
index 66ad37b..93c332f 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheClearCommandSpec.scala
@@ -78,25 +78,29 @@ class VisorCacheClearCommandSpec extends VisorRuntimeBaseSpec(2) {
     behavior of "An 'cclear' visor command"
 
     it should "show correct result for default cache" in {
-        Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
 
-        Ignition.ignite("node-1").cache[Int, Int](null).lock(1, 0)
+        val lock = Ignition.ignite("node-1").jcache[Int, Int](null).lock(1)
+
+        lock.lock()
 
         VisorCacheClearCommand().clear(Nil, None)
 
-        Ignition.ignite("node-1").cache[Int, Int](null).unlock(1)
+        lock.unlock()
 
         VisorCacheClearCommand().clear(Nil, None)
     }
 
     it should "show correct result for named cache" in {
-        Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
+
+        val lock = Ignition.ignite("node-1").jcache[Int, Int]("cache").lock(1)
 
-        Ignition.ignite("node-1").cache[Int, Int]("cache").lock(1, 0)
+        lock.lock()
 
         visor.cache("-clear -c=cache")
 
-        Ignition.ignite("node-1").cache[Int, Int]("cache").unlock(1)
+        lock.unlock()
 
         visor.cache("-clear -c=cache")
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
index 1920f17..76f2444 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommandSpec.scala
@@ -51,7 +51,7 @@ class VisorCacheCommandSpec extends FlatSpec with Matchers with BeforeAndAfterAl
     behavior of "A 'cache' visor command"
 
     it should "put/get some values to/from cache and display information about caches" in
{
-        val c = Ignition.ignite.cache[String, String]("partitioned")
+        val c = Ignition.ignite.jcache[String, String]("partitioned")
 
         for (i <- 0 to 3) {
             val kv = "" + i

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
index 26576b9..c3a03ae 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
@@ -76,17 +76,17 @@ class VisorCacheCompactCommandSpec extends VisorRuntimeBaseSpec(2) {
     behavior of "An 'ccompact' visor command"
 
     it should "show correct result for default cache" in {
-        Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
 
-        Ignition.ignite("node-1").cache[Int, Int](null).clearLocally(1)
+        Ignition.ignite("node-1").jcache[Int, Int](null).evict(1)
 
         VisorCacheCompactCommand().compact(Nil, None)
     }
 
     it should "show correct result for named cache" in {
-        Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
 
-        Ignition.ignite("node-1").cache[Int, Int]("cache").clearLocally(1)
+        Ignition.ignite("node-1").jcache[Int, Int]("cache").evict(1)
 
         visor.cache("-compact -c=cache")
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala
index 1bfd267..56a4bec 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cswap/VisorCacheSwapCommandSpec.scala
@@ -72,13 +72,13 @@ class VisorCacheSwapCommandSpec extends VisorRuntimeBaseSpec(2) {
     behavior of "An 'cswap' visor command"
 
     it should "show correct result for default cache" in {
-        Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
 
         visor.cache("-swap -c=<default>")
     }
 
     it should "show correct result for named cache" in {
-        Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
+        Ignition.ignite("node-1").jcache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
 
         visor.cache("-swap -c=cache")
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/604a6803/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
index 082b314..0d84102 100644
--- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.websession;
 
-import org.apache.ignite.cache.*;
+import org.apache.ignite.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -86,7 +86,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
             try (BufferedReader rdr = new BufferedReader(new InputStreamReader(conn.getInputStream())))
{
                 String sesId = rdr.readLine();
 
-                GridCache<String, HttpSession> cache = G.ignite().cache(getCacheName());
+                IgniteCache<String, HttpSession> cache = G.ignite().jcache(getCacheName());
 
                 assertNotNull(cache);
 


Mime
View raw message