ignite-3621 Fixed 'testEvictExpired'. (cherry picked from commit 4ff19c2)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b2faa339 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b2faa339 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b2faa339 Branch: refs/heads/ignite-comm-balance Commit: b2faa339acb2eea24e6dd5e0c21fc3d3d0592ff6 Parents: e3f1345 Author: sboikov <[email protected]> Authored: Wed Sep 28 13:47:51 2016 +0300 Committer: sboikov <[email protected]> Committed: Wed Sep 28 15:43:26 2016 +0300 ---------------------------------------------------------------------- .../cache/GridCacheAbstractFullApiSelfTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/b2faa339/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 e7daf2b..52d9a5e 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 @@ -3475,9 +3475,16 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract grid(0).cache(null).withExpiryPolicy(expiry).put(key, 1); + final Affinity<String> aff = ignite(0).affinity(null); + boolean wait = waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { - return cache.localPeek(key) == null; + for (int i = 0; i < gridCount(); i++) { + if (peek(jcache(i), key) != null) + return false; + } + + return true; } }, ttl + 1000); @@ -3496,8 +3503,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract load(cache, key, true); - Affinity<String> aff = ignite(0).affinity(null); - for (int i = 0; i < gridCount(); i++) { if (aff.isPrimary(grid(i).cluster().localNode(), key)) assertEquals((Integer)1, peek(jcache(i), key));
