ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [13/50] incubator-ignite git commit: # ignite-sprint-4 GridCacheAbstractFailoverSelfTest: wait for some time for cache size
Date Wed, 15 Apr 2015 14:36:22 GMT
# ignite-sprint-4 GridCacheAbstractFailoverSelfTest: wait for some time for cache size


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

Branch: refs/heads/ignite-446
Commit: 4649f85f2b1212495feb195fa5a10c067420756c
Parents: b39aa56
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Apr 14 11:51:02 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Apr 14 11:51:02 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFailoverSelfTest.java          | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4649f85f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
index 4025265..aee3588 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
+import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
@@ -317,8 +318,15 @@ public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstrac
     /**
      * @param cache Cache.
      * @param expSize Minimum expected cache size.
+     * @throws Exception If failed.
      */
-    private void check(IgniteCache<String,Integer> cache, int expSize) {
+    private void check(final IgniteCache<String, Integer> cache, final int expSize)
throws Exception {
+        GridTestUtils.waitForCondition(new GridAbsPredicate() {
+            @Override public boolean apply() {
+                return cache.size() >= expSize;
+            }
+        }, 5000);
+
         int size = cache.size();
 
         assertTrue("Key set size is lesser then the expected size [size=" + size + ", expSize="
+ expSize + ']',


Mime
View raw message