ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [23/50] incubator-ignite git commit: ignite-629: Add test for skip store and remove iterator.
Date Wed, 01 Apr 2015 08:32:41 GMT
ignite-629: Add test for skip store and remove iterator.


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

Branch: refs/heads/ignite-639
Commit: 50998c504573834e243df8b00681dcc8aa22dcf6
Parents: 885643a
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Tue Mar 31 12:30:44 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Tue Mar 31 12:30:44 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50998c50/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 f543be0..1a8bdcd 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
@@ -4291,6 +4291,34 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
             assertNotNull(cache.get(key));
         }
+
+        String newKey = "New key";
+
+        assertFalse(map.containsKey(newKey));
+
+        cacheSkipStore.put(newKey, 1);
+
+        assertFalse(map.containsKey(newKey));
+
+        cache.put(newKey, 1);
+
+        assertTrue(map.containsKey(newKey));
+
+        Iterator<Cache.Entry<String, Integer>> it = cacheSkipStore.iterator();
+
+        assertTrue(it.hasNext());
+
+        Cache.Entry<String, Integer> entry = it.next();
+
+        String removedKey =  entry.getKey();
+
+        assertTrue(map.containsKey(removedKey));
+
+        it.remove();
+
+        assertNull(cacheSkipStore.get(removedKey));
+
+        assertTrue(map.containsKey(removedKey));
     }
 
     /**


Mime
View raw message