Failing tests hotfix

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

Branch: refs/heads/ignite-1786
Commit: 3602d46573ee98ce440fbcc4457f38252aa8351b
Parents: afd3bc1
Author: Anton Vinogradov <[email protected]>
Authored: Fri Feb 5 12:06:42 2016 +0300
Committer: Anton Vinogradov <[email protected]>
Committed: Fri Feb 5 12:06:42 2016 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/3602d465/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index 1507543..8ef3f9b 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -386,7 +386,15 @@ public abstract class IgniteCacheAbstractQuerySelfTest 
extends GridCommonAbstrac
 
         assertEquals(1, res.getValue().intValue());
 
-        U.sleep(1020);
+        U.sleep(800); // Less than minimal amount of time that must pass 
before a cache entry is considered expired.
+
+        qry =  cache.query(new SqlQuery<Integer, Integer>(Integer.class, 
"1=1")).getAll();
+
+        res = F.first(qry);
+
+        assertEquals(1, res.getValue().intValue());
+
+        U.sleep(1200); // No expiry guarantee here. Test should be refactored 
in case of fails.
 
         qry = cache.query(new SqlQuery<Integer, Integer>(Integer.class, 
"1=1")).getAll();
 

Reply via email to