Repository: incubator-ignite Updated Branches: refs/heads/sprint-3 25b92e265 -> 3b036463b
#ignite-565: remove GridCache from 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/1939e206 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/1939e206 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/1939e206 Branch: refs/heads/sprint-3 Commit: 1939e20663be7c49efaa04629de69c6f49ec8e98 Parents: 528bf00 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Wed Mar 25 12:46:09 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Wed Mar 25 12:46:09 2015 +0300 ---------------------------------------------------------------------- .../cache/distributed/GridDistributedCacheAdapter.java | 2 +- .../internal/processors/cache/GridCacheAbstractSelfTest.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1939e206/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java index 445efd0..6517fd0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java @@ -291,7 +291,7 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter dataLdr.receiver(DataStreamerCacheUpdaters.<KeyCacheObject, Object>batched()); for (GridDhtLocalPartition locPart : dht.topology().currentLocalPartitions()) { - if (!locPart.isEmpty()) { + if (!locPart.isEmpty() && locPart.primary(topVer)) { for (GridDhtCacheEntry o : locPart.entries()) dataLdr.removeDataInternal(o.key()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1939e206/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java index e997780..59c134f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java @@ -120,6 +120,11 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest { @Override public boolean applyx() throws IgniteCheckedException { jcache(fi).removeAll(); + if (jcache(fi).size() > 0) { + for (Cache.Entry<String, ?> k : jcache(fi).localEntries()) + jcache(fi).remove(k.getKey()); + } + return jcache(fi).localSize() == 0; } },