Merge remote-tracking branch 'remotes/origin/ignite-sprint-1' into ignite-56
Conflicts:
modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePortableStoreAbstractSelfTest.java
modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/portable/GridCacheAbstractSelfTest.java
modules/core/src/test/java/org/gridgain/grid/util/portable/GridPortableBuilderAdditionalSelfTest.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/46e1cc72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/46e1cc72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/46e1cc72
Branch: refs/heads/ignite-111
Commit: 46e1cc7222e01772b917c0a43d148a1df0950dd6
Parents: d13274a
Author: sevdokimov <[email protected]>
Authored: Thu Feb 5 18:39:25 2015 +0300
Committer: sevdokimov <[email protected]>
Committed: Thu Feb 5 18:39:25 2015 +0300
----------------------------------------------------------------------
...cheAbstractFullApiMultithreadedSelfTest.java | 46 +++++++++++++++-----
...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 5 +--
2 files changed, 36 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46e1cc72/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
index 70f8b6a..8e9bbbd 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -166,7 +166,7 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
*/
public void testGet() throws Exception {
runTest(new CIX1<IgniteCache<String,Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> cache)
throws IgniteCheckedException {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
assert cache.get("key" + rnd) == rnd;
@@ -180,7 +180,7 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
*/
public void testGetAsync() throws Exception {
runTest(new CIX1<IgniteCache<String,Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> cache)
throws IgniteCheckedException {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
IgniteCache<String, Integer> cacheAsync = cache.withAsync();
@@ -219,7 +219,7 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
*/
public void testGetAllAsync() throws Exception {
runTest(new CIX1<IgniteCache<String,Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> cache)
throws IgniteCheckedException {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -238,7 +238,7 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
*/
public void testRemove() throws Exception {
runTest(new CIX1<IgniteCache<String,Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> cache)
throws IgniteCheckedException {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -262,7 +262,7 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
*/
public void testRemoveAsync() throws Exception {
runTest(new CIX1<IgniteCache<String,Integer>>() {
- @Override public void applyx(IgniteCache<String, Integer> cache)
throws IgniteCheckedException {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd1 = random();
int rnd2 = random();
@@ -308,21 +308,43 @@ public abstract class
GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
* @throws Exception In case of error.
*/
public void testRemoveAllAsync() throws Exception {
- runTest(new CIX1<GridCache<String,Integer>>() {
- @Override public void applyx(GridCache<String, Integer> cache)
throws IgniteCheckedException {
+ runTest(new CIX1<IgniteCache<String,Integer>>() {
+ @Override public void applyx(IgniteCache<String, Integer> cache) {
int rnd = random();
- return cache.withAsync().<V>future().get();
+ IgniteCache<String, Integer> cacheAsync = cache.withAsync();
+
+ cacheAsync.removeAll(rangeKeys(0, rnd));
+
+ cacheAsync.future().get();
+
+ for (int i = 0; i < rnd; i++)
+ assert cache.localPeek("key" + i) == null;
+ }
+ });
+ }
+
+ /**
+ * @param cache Cache.
+ * @param key Key.
+ */
+ private <K, V> V removeAsync(IgniteCache<K, V> cache, K key) {
+ IgniteCache<K, V> cacheAsync = cache.withAsync();
+
+ cacheAsync.getAndRemove(key);
+
+ return cacheAsync.<V>future().get();
}
/**
* @param cache Cache.
* @param key Key.
- * @param val Value.
*/
- private <K, V> boolean removeAsync(IgniteCache<K, V> cache, K key, V val)
throws IgniteCheckedException {
- cache.withAsync().remove(key, val);
+ private <K, V> boolean removeAsync(IgniteCache<K, V> cache, K key, V val) {
+ IgniteCache<K, V> cacheAsync = cache.withAsync();
+
+ cacheAsync.remove(key, val);
- return cache.withAsync().<Boolean>future().get();
+ return cacheAsync.<Boolean>future().get();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46e1cc72/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index 88bc925..a77c563 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -301,12 +301,11 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest
extends GridCachePartitio
nearCache.putAll(vals);
- for (String subKey : subKeys)
- nearCache.clearLocally(subKey);
+ nearCache.clear(subKeys);
for (String key : subKeys) {
assertNull(nearCache.localPeek(key));
- assertNotNull(primary.localPeek(key));
+ assertNull(primary.localPeek(key));
}
assertEquals(vals.get(lastKey), nearCache.localPeek(lastKey));