ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4932 WIP
Date Thu, 13 Apr 2017 08:43:33 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4932 e13c0e1b8 -> 82956636f


ignite-4932 WIP


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

Branch: refs/heads/ignite-4932
Commit: 82956636fcf0ae541905db546f93ac72eff3d1d6
Parents: e13c0e1
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 13 11:43:19 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 13 11:43:19 2017 +0300

----------------------------------------------------------------------
 .../rest/JettyRestProcessorAbstractSelfTest.java | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/82956636/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 8d3ab74..9d8a93f 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -56,6 +56,7 @@ import org.apache.ignite.internal.processors.cache.query.GridCacheSqlIndexMetada
 import org.apache.ignite.internal.processors.cache.query.GridCacheSqlMetadata;
 import org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
 import org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyObjectMapper;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.internal.util.lang.GridTuple3;
 import org.apache.ignite.internal.util.typedef.C1;
 import org.apache.ignite.internal.util.typedef.F;
@@ -702,6 +703,8 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
 
         Thread.sleep(2100);
 
+        waitExpired("putKey");
+
         assertNull(jcache().get("putKey"));
     }
 
@@ -733,6 +736,8 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
 
         Thread.sleep(2100);
 
+        waitExpired("addKey");
+
         assertNull(jcache().get("addKey"));
     }
 
@@ -865,6 +870,8 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
         // Use larger value to avoid false positives.
         Thread.sleep(2100);
 
+        waitExpired("replaceKey");
+
         assertNull(jcache().get("replaceKey"));
     }
 
@@ -2270,6 +2277,18 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
         }
     }
 
+    /**
+     * @param key Key.
+     * @throws Exception Exception.
+     */
+    private void waitExpired(final Object key) throws Exception {
+        GridTestUtils.waitForCondition(new GridAbsPredicate() {
+            @Override public boolean apply() {
+                return jcache().get(key) == null;
+            }
+        }, 5000);
+    }
+
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);


Mime
View raw message