ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [48/50] [abbrv] incubator-ignite git commit: #ignite-333: fix test
Date Thu, 19 Mar 2015 02:55:07 GMT
#ignite-333: fix test


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

Branch: refs/heads/ignite-375
Commit: fe649a4c9adaf23975ad7b4051cd1989ffe43f9b
Parents: 79ea159
Author: ivasilinets <vasilinetc.ira@gmail.com>
Authored: Wed Mar 18 22:25:42 2015 +0300
Committer: ivasilinets <vasilinetc.ira@gmail.com>
Committed: Wed Mar 18 22:25:42 2015 +0300

----------------------------------------------------------------------
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java | 31 ++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fe649a4c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
index 505aed9..a97f700 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
@@ -144,6 +144,37 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
     }
 
     /** {@inheritDoc} */
+    @Override public void testLocalClearKeys() throws Exception {
+        IgniteCache<String, Integer> nearCache = jcache();
+        IgniteCache<String, Integer> primary = fullCache();
+
+        Collection<String> keys = primaryKeysForCache(primary, 3);
+
+        int i = 0;
+
+        for (String key : keys)
+            nearCache.put(key, i++);
+
+        String lastKey = F.last(keys);
+
+        Set<String> keysToRmv = new HashSet<>(keys);
+
+        keysToRmv.remove(lastKey);
+
+        assert keysToRmv.size() > 1;
+
+        nearCache.localClearAll(keysToRmv);
+
+        for (String key : keys) {
+            if (keysToRmv.contains(key)) {
+                assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
+
+                assertNotNull(primary.localPeek(key, CachePeekMode.ONHEAP));
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
     @Override public void testEvictExpired() throws Exception {
         IgniteCache<String, Integer> cache = jcache();
 


Mime
View raw message