ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-56 Use IgniteCache in Grid tests and client tests.
Date Sun, 01 Feb 2015 12:25:35 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-56 [created] d1bdc728a


# IGNITE-56 Use IgniteCache in Grid tests and client tests.


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

Branch: refs/heads/ignite-56
Commit: d1bdc728a9075d30a38e27d8bc91c6e70cc35ce4
Parents: 7e8ea4f
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Sun Feb 1 15:25:12 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Sun Feb 1 15:25:12 2015 +0300

----------------------------------------------------------------------
 .../client/ClientDefaultCacheSelfTest.java      |   4 +-
 .../rest/AbstractRestProcessorSelfTest.java     |  12 +-
 .../rest/ClientMemcachedProtocolSelfTest.java   |  68 +++++------
 .../JettyRestProcessorAbstractSelfTest.java     | 112 +++++++++----------
 4 files changed, 101 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d1bdc728/modules/clients/src/test/java/org/apache/ignite/client/ClientDefaultCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/client/ClientDefaultCacheSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/client/ClientDefaultCacheSelfTest.java
index 0161c16..9b88a16 100644
--- a/modules/clients/src/test/java/org/apache/ignite/client/ClientDefaultCacheSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/client/ClientDefaultCacheSelfTest.java
@@ -137,9 +137,7 @@ public class ClientDefaultCacheSelfTest extends GridCommonAbstractTest
{
      */
     public void testTcp() throws Exception {
         try {
-            boolean putRes = cache().putx("key", 1);
-
-            assert putRes : "Put operation failed";
+            jcache().put("key", 1);
 
             GridClient client = clientTcp();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d1bdc728/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/AbstractRestProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/AbstractRestProcessorSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/AbstractRestProcessorSelfTest.java
index de4b559..4ef80c3 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/AbstractRestProcessorSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/AbstractRestProcessorSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.rest;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -56,9 +57,9 @@ abstract class AbstractRestProcessorSelfTest extends GridCommonAbstractTest
{
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        cache().clearAll();
+        jcache().clear();
 
-        assertTrue(cache().isEmpty());
+        assertTrue(jcache().localSize() == 0);
     }
 
     /** {@inheritDoc} */
@@ -94,4 +95,11 @@ abstract class AbstractRestProcessorSelfTest extends GridCommonAbstractTest
{
     @Override protected <K, V> GridCache<K, V> cache() {
         return grid(0).cache(null);
     }
+
+    /**
+     * @return Cache.
+     */
+    @Override protected <K, V> IgniteCache<K, V> jcache() {
+        return grid(0).jcache(null);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d1bdc728/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java
index c779eb8..a3b7ce7 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/ClientMemcachedProtocolSelfTest.java
@@ -90,8 +90,8 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
      * @throws Exception If failed.
      */
     public void testGet() throws Exception {
-        Assert.assertTrue(cache().putx("getKey1", "getVal1"));
-        Assert.assertTrue(cache().putx("getKey2", "getVal2"));
+        jcache().put("getKey1", "getVal1");
+        jcache().put("getKey2", "getVal2");
 
         Assert.assertEquals("getVal1", client.get("getKey1"));
         Assert.assertEquals("getVal2", client.get("getKey2"));
@@ -102,9 +102,9 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
      * @throws Exception If failed.
      */
     public void testGetBulk() throws Exception {
-        Assert.assertTrue(cache().putx("getKey1", "getVal1"));
-        Assert.assertTrue(cache().putx("getKey2", "getVal2"));
-        Assert.assertTrue(cache().putx("getKey3", "getVal3"));
+        jcache().put("getKey1", "getVal1");
+        jcache().put("getKey2", "getVal2");
+        jcache().put("getKey3", "getVal3");
 
         Map<String, Object> map = client.getBulk("getKey1", "getKey2");
 
@@ -120,7 +120,7 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testSet() throws Exception {
         Assert.assertTrue(client.set("setKey", 0, "setVal").get());
 
-        assertEquals("setVal", cache().get("setKey"));
+        assertEquals("setVal", jcache().get("setKey"));
     }
 
     /**
@@ -129,24 +129,24 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testSetWithExpiration() throws Exception {
         Assert.assertTrue(client.set("setKey", 2000, "setVal").get());
 
-        assertEquals("setVal", cache().get("setKey"));
+        assertEquals("setVal", jcache().get("setKey"));
 
         Thread.sleep(2100);
 
-        Assert.assertNull(cache().get("setKey"));
+        Assert.assertNull(jcache().get("setKey"));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAdd() throws Exception {
-        Assert.assertTrue(cache().putx("addKey1", "addVal1"));
+        jcache().put("addKey1", "addVal1");
 
         Assert.assertFalse(client.add("addKey1", 0, "addVal1New").get());
         Assert.assertTrue(client.add("addKey2", 0, "addVal2").get());
 
-        assertEquals("addVal1", cache().get("addKey1"));
-        assertEquals("addVal2", cache().get("addKey2"));
+        assertEquals("addVal1", jcache().get("addKey1"));
+        assertEquals("addVal2", jcache().get("addKey2"));
     }
 
     /**
@@ -155,11 +155,11 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testAddWithExpiration() throws Exception {
         Assert.assertTrue(client.add("addKey", 2000, "addVal").get());
 
-        assertEquals("addVal", cache().get("addKey"));
+        assertEquals("addVal", jcache().get("addKey"));
 
         Thread.sleep(2100);
 
-        Assert.assertNull(cache().get("addKey"));
+        Assert.assertNull(jcache().get("addKey"));
     }
 
     /**
@@ -168,27 +168,27 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testReplace() throws Exception {
         Assert.assertFalse(client.replace("replaceKey", 0, "replaceVal").get());
 
-        Assert.assertNull(cache().get("replaceKey"));
-        Assert.assertTrue(cache().putx("replaceKey", "replaceVal"));
+        Assert.assertNull(jcache().get("replaceKey"));
+        jcache().put("replaceKey", "replaceVal");
 
         Assert.assertTrue(client.replace("replaceKey", 0, "replaceValNew").get());
 
-        assertEquals("replaceValNew", cache().get("replaceKey"));
+        assertEquals("replaceValNew", jcache().get("replaceKey"));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplaceWithExpiration() throws Exception {
-        Assert.assertTrue(cache().putx("replaceKey", "replaceVal"));
+        jcache().put("replaceKey", "replaceVal");
 
         Assert.assertTrue(client.set("replaceKey", 2000, "replaceValNew").get());
 
-        assertEquals("replaceValNew", cache().get("replaceKey"));
+        assertEquals("replaceValNew", jcache().get("replaceKey"));
 
         Thread.sleep(2100);
 
-        Assert.assertNull(cache().get("replaceKey"));
+        Assert.assertNull(jcache().get("replaceKey"));
     }
 
     /**
@@ -197,11 +197,11 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testDelete() throws Exception {
         Assert.assertFalse(client.delete("deleteKey").get());
 
-        Assert.assertTrue(cache().putx("deleteKey", "deleteVal"));
+        jcache().put("deleteKey", "deleteVal");
 
         Assert.assertTrue(client.delete("deleteKey").get());
 
-        Assert.assertNull(cache().get("deleteKey"));
+        Assert.assertNull(jcache().get("deleteKey"));
     }
 
     /**
@@ -234,22 +234,22 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
      * @throws Exception If failed.
      */
     public void testFlush() throws Exception {
-        Assert.assertTrue(cache().putx("flushKey1", "flushVal1"));
-        Assert.assertTrue(cache().putx("flushKey2", "flushVal2"));
+        jcache().put("flushKey1", "flushVal1");
+        jcache().put("flushKey2", "flushVal2");
 
         Assert.assertTrue(client.flush().get());
 
-        Assert.assertNull(cache().get("flushKey1"));
-        Assert.assertNull(cache().get("flushKey2"));
-        Assert.assertTrue(cache().isEmpty());
+        Assert.assertNull(jcache().get("flushKey1"));
+        Assert.assertNull(jcache().get("flushKey2"));
+        Assert.assertTrue(jcache().localSize() == 0);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testStat() throws Exception {
-        Assert.assertTrue(cache().putx("statKey1", "statVal1"));
-        assertEquals("statVal1", cache().get("statKey1"));
+        jcache().put("statKey1", "statVal1");
+        assertEquals("statVal1", jcache().get("statKey1"));
 
         Map<SocketAddress, Map<String, String>> map = client.getStats();
 
@@ -261,8 +261,8 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
         Assert.assertTrue(Integer.valueOf(stats.get("writes")) >= 1);
         Assert.assertTrue(Integer.valueOf(stats.get("reads")) >= 1);
 
-        Assert.assertTrue(cache().putx("statKey2", "statVal2"));
-        assertEquals("statVal2", cache().get("statKey2"));
+        jcache().put("statKey2", "statVal2");
+        assertEquals("statVal2", jcache().get("statKey2"));
 
         map = client.getStats();
 
@@ -281,13 +281,13 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testAppend() throws Exception {
         Assert.assertFalse(client.append(0, "appendKey", "_suffix").get());
 
-        Assert.assertTrue(cache().putx("appendKey", "appendVal"));
+        jcache().put("appendKey", "appendVal");
 
         Assert.assertTrue(client.append(0, "appendKey", "_suffix").get());
 
         Assert.assertEquals("appendVal_suffix", client.get("appendKey"));
 
-        assertEquals("appendVal_suffix", cache().get("appendKey"));
+        assertEquals("appendVal_suffix", jcache().get("appendKey"));
     }
 
     /**
@@ -296,13 +296,13 @@ public class ClientMemcachedProtocolSelfTest extends AbstractRestProcessorSelfTe
     public void testPrepend() throws Exception {
         Assert.assertFalse(client.append(0, "prependKey", "_suffix").get());
 
-        Assert.assertTrue(cache().putx("prependKey", "prependVal"));
+        jcache().put("prependKey", "prependVal");
 
         Assert.assertTrue(client.append(0, "prependKey", "_suffix").get());
 
         Assert.assertEquals("prependVal_suffix", client.get("prependKey"));
 
-        assertEquals("prependVal_suffix", cache().get("prependKey"));
+        assertEquals("prependVal_suffix", jcache().get("prependKey"));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d1bdc728/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index a29b0db..5a0a687 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -206,7 +206,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testGet() throws Exception {
-        assertTrue(cache().putx("getKey", "getVal"));
+        jcache().put("getKey", "getVal");
 
         String ret = content(F.asMap("cmd", "get", "key", "getKey"));
 
@@ -222,8 +222,8 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testGetAll() throws Exception {
-        assertTrue(cache().putx("getKey1", "getVal1"));
-        assertTrue(cache().putx("getKey2", "getVal2"));
+        jcache().put("getKey1", "getVal1");
+        jcache().put("getKey2", "getVal2");
 
         String ret = content(F.asMap("cmd", "getall", "k1", "getKey1", "k2", "getKey2"));
 
@@ -247,7 +247,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Put command result: " + ret);
 
-        assertEquals("putVal", cache().peek("putKey"));
+        assertEquals("putVal", jcache().localPeek("putKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -263,18 +263,18 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("putVal", cache().get("putKey"));
+        assertEquals("putVal", jcache().get("putKey"));
 
         Thread.sleep(2100);
 
-        assertNull(cache().get("putKey"));
+        assertNull(jcache().get("putKey"));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAdd() throws Exception {
-        assertTrue(cache().putx("addKey1", "addVal1"));
+        jcache().put("addKey1", "addVal1");
 
         String ret = content(F.asMap("cmd", "add", "key", "addKey2", "val", "addVal2"));
 
@@ -283,8 +283,8 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("addVal1", cache().peek("addKey1"));
-        assertEquals("addVal2", cache().peek("addKey2"));
+        assertEquals("addVal1", jcache().localPeek("addKey1"));
+        assertEquals("addVal2", jcache().localPeek("addKey2"));
     }
 
     /**
@@ -298,11 +298,11 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("addVal", cache().get("addKey"));
+        assertEquals("addVal", jcache().get("addKey"));
 
         Thread.sleep(2100);
 
-        assertNull(cache().get("addKey"));
+        assertNull(jcache().get("addKey"));
     }
 
     /**
@@ -317,8 +317,8 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Put all command result: " + ret);
 
-        assertEquals("putVal1", cache().peek("putKey1"));
-        assertEquals("putVal2", cache().peek("putKey2"));
+        assertEquals("putVal1", jcache().localPeek("putKey1"));
+        assertEquals("putVal2", jcache().localPeek("putKey2"));
 
         jsonEquals(ret, cacheBulkPattern(true, true));
     }
@@ -327,9 +327,9 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testRemove() throws Exception {
-        assertTrue(cache().putx("rmvKey", "rmvVal"));
+        jcache().put("rmvKey", "rmvVal");
 
-        assertEquals("rmvVal", cache().peek("rmvKey"));
+        assertEquals("rmvVal", jcache().localPeek("rmvKey"));
 
         String ret = content(F.asMap("cmd", "rmv", "key", "rmvKey"));
 
@@ -338,7 +338,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove command result: " + ret);
 
-        assertNull(cache().peek("rmvKey"));
+        assertNull(jcache().localPeek("rmvKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -347,15 +347,15 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testRemoveAll() throws Exception {
-        assertTrue(cache().putx("rmvKey1", "rmvVal1"));
-        assertTrue(cache().putx("rmvKey2", "rmvVal2"));
-        assertTrue(cache().putx("rmvKey3", "rmvVal3"));
-        assertTrue(cache().putx("rmvKey4", "rmvVal4"));
+        jcache().put("rmvKey1", "rmvVal1");
+        jcache().put("rmvKey2", "rmvVal2");
+        jcache().put("rmvKey3", "rmvVal3");
+        jcache().put("rmvKey4", "rmvVal4");
 
-        assertEquals("rmvVal1", cache().peek("rmvKey1"));
-        assertEquals("rmvVal2", cache().peek("rmvKey2"));
-        assertEquals("rmvVal3", cache().peek("rmvKey3"));
-        assertEquals("rmvVal4", cache().peek("rmvKey4"));
+        assertEquals("rmvVal1", jcache().localPeek("rmvKey1"));
+        assertEquals("rmvVal2", jcache().localPeek("rmvKey2"));
+        assertEquals("rmvVal3", jcache().localPeek("rmvKey3"));
+        assertEquals("rmvVal4", jcache().localPeek("rmvKey4"));
 
         String ret = content(F.asMap("cmd", "rmvall", "k1", "rmvKey1", "k2", "rmvKey2"));
 
@@ -364,10 +364,10 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove all command result: " + ret);
 
-        assertNull(cache().peek("rmvKey1"));
-        assertNull(cache().peek("rmvKey2"));
-        assertEquals("rmvVal3", cache().peek("rmvKey3"));
-        assertEquals("rmvVal4", cache().peek("rmvKey4"));
+        assertNull(jcache().localPeek("rmvKey1"));
+        assertNull(jcache().localPeek("rmvKey2"));
+        assertEquals("rmvVal3", jcache().localPeek("rmvKey3"));
+        assertEquals("rmvVal4", jcache().localPeek("rmvKey4"));
 
         jsonEquals(ret, cacheBulkPattern(true, true));
 
@@ -378,11 +378,11 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove all command result: " + ret);
 
-        assertNull(cache().peek("rmvKey1"));
-        assertNull(cache().peek("rmvKey2"));
-        assertNull(cache().peek("rmvKey3"));
-        assertNull(cache().peek("rmvKey4"));
-        assertTrue(cache().isEmpty());
+        assertNull(jcache().localPeek("rmvKey1"));
+        assertNull(jcache().localPeek("rmvKey2"));
+        assertNull(jcache().localPeek("rmvKey3"));
+        assertNull(jcache().localPeek("rmvKey4"));
+        assertTrue(jcache().localSize() == 0);
 
         jsonEquals(ret, cacheBulkPattern(true, true));
     }
@@ -391,9 +391,9 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testCas() throws Exception {
-        assertTrue(cache().putx("casKey", "casOldVal"));
+        jcache().put("casKey", "casOldVal");
 
-        assertEquals("casOldVal", cache().peek("casKey"));
+        assertEquals("casOldVal", jcache().localPeek("casKey"));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val2", "casOldVal",
"val1", "casNewVal"));
 
@@ -402,20 +402,20 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAS command result: " + ret);
 
-        assertEquals("casNewVal", cache().peek("casKey"));
+        assertEquals("casNewVal", jcache().localPeek("casKey"));
 
         jsonEquals(ret, cachePattern(true, true));
 
-        cache().remove("casKey");
+        jcache().remove("casKey");
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplace() throws Exception {
-        assertTrue(cache().putx("repKey", "repOldVal"));
+        jcache().put("repKey", "repOldVal");
 
-        assertEquals("repOldVal", cache().peek("repKey"));
+        assertEquals("repOldVal", jcache().localPeek("repKey"));
 
         String ret = content(F.asMap("cmd", "rep", "key", "repKey", "val", "repVal"));
 
@@ -424,7 +424,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Replace command result: " + ret);
 
-        assertEquals("repVal", cache().peek("repKey"));
+        assertEquals("repVal", jcache().localPeek("repKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -433,9 +433,9 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testReplaceWithExpiration() throws Exception {
-        assertTrue(cache().putx("replaceKey", "replaceVal"));
+        jcache().put("replaceKey", "replaceVal");
 
-        assertEquals("replaceVal", cache().get("replaceKey"));
+        assertEquals("replaceVal", jcache().get("replaceKey"));
 
         String ret = content(F.asMap("cmd", "rep", "key", "replaceKey", "val", "replaceValNew",
"exp", "2000"));
 
@@ -444,19 +444,19 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("replaceValNew", cache().get("replaceKey"));
+        assertEquals("replaceValNew", jcache().get("replaceKey"));
 
         // Use larger value to avoid false positives.
         Thread.sleep(2100);
 
-        assertNull(cache().get("replaceKey"));
+        assertNull(jcache().get("replaceKey"));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAppend() throws Exception {
-        assertTrue(cache().putx("appendKey", "appendVal"));
+        jcache().put("appendKey", "appendVal");
 
         String ret = content(F.asMap("cmd", "append", "key", "appendKey", "val", "_suffix"));
 
@@ -465,14 +465,14 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("appendVal_suffix", cache().get("appendKey"));
+        assertEquals("appendVal_suffix", jcache().get("appendKey"));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPrepend() throws Exception {
-        assertTrue(cache().putx("prependKey", "prependVal"));
+        jcache().put("prependKey", "prependVal");
 
         String ret = content(F.asMap("cmd", "prepend", "key", "prependKey", "val", "prefix_"));
 
@@ -481,7 +481,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("prefix_prependVal", cache().get("prependKey"));
+        assertEquals("prefix_prependVal", jcache().get("prependKey"));
     }
 
     /**
@@ -534,9 +534,9 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testCar() throws Exception {
-        assertTrue(cache().putx("casKey", "casOldVal"));
+        jcache().put("casKey", "casOldVal");
 
-        assertEquals("casOldVal", cache().peek("casKey"));
+        assertEquals("casOldVal", jcache().localPeek("casKey"));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val2", "casOldVal"));
 
@@ -545,7 +545,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAR command result: " + ret);
 
-        assertNull(cache().peek("casKey"));
+        assertNull(jcache().localPeek("casKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -554,7 +554,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testPutIfAbsent() throws Exception {
-        assertNull(cache().peek("casKey"));
+        assertNull(jcache().localPeek("casKey"));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val1", "casNewVal"));
 
@@ -563,7 +563,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("PutIfAbsent command result: " + ret);
 
-        assertEquals("casNewVal", cache().peek("casKey"));
+        assertEquals("casNewVal", jcache().localPeek("casKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -572,9 +572,9 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testCasRemove() throws Exception {
-        assertTrue(cache().putx("casKey", "casVal"));
+        jcache().put("casKey", "casVal");
 
-        assertEquals("casVal", cache().peek("casKey"));
+        assertEquals("casVal", jcache().localPeek("casKey"));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey"));
 
@@ -583,7 +583,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAS Remove command result: " + ret);
 
-        assertNull(cache().peek("casKey"));
+        assertNull(jcache().localPeek("casKey"));
 
         jsonEquals(ret, cachePattern(true, true));
     }


Mime
View raw message