usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject incubator-usergrid git commit: add arbitrary wait and synchronization
Date Wed, 01 Apr 2015 20:25:00 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev dd1c268bc -> cdcb4aeb5


add arbitrary wait and synchronization


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

Branch: refs/heads/two-dot-o-dev
Commit: cdcb4aeb5123b4a62de328b18c8813ecf4cf14b2
Parents: dd1c268
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Wed Apr 1 14:24:50 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Wed Apr 1 14:24:50 2015 -0600

----------------------------------------------------------------------
 .../test/java/org/apache/usergrid/CoreApplication.java    | 10 ++++++----
 .../usergrid/persistence/query/IteratingQueryIT.java      |  2 ++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cdcb4aeb/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
index 503da3d..c59ff72 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
@@ -215,14 +215,16 @@ public class CoreApplication implements Application, TestRule {
 
 
     @Override
-    public void refreshIndex() {
+    public synchronized void refreshIndex() {
         try{
             Thread.sleep(50);
-        }catch (InterruptedException ie){
-
-        }
+        }catch (InterruptedException ie){}
 
         entityIndex.refresh();
+
+        try{
+            Thread.sleep(50);
+        }catch (InterruptedException ie){}
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cdcb4aeb/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
index d5f2fe3..c2b8b87 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
@@ -367,6 +367,8 @@ public class IteratingQueryIT {
                 expected.add( name );
             }
         }
+        app.refreshIndex();
+
 
         long stop = System.currentTimeMillis();
 


Mime
View raw message