You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/05/28 01:37:28 UTC

incubator-usergrid git commit: Fixed staleIndexTest

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev 1b3f7d58b -> 02f5530e2


Fixed staleIndexTest


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

Branch: refs/heads/two-dot-o-dev
Commit: 02f5530e25cb50912a4779520589fa3336fae88e
Parents: 1b3f7d5
Author: GERey <gr...@apigee.com>
Authored: Wed May 27 16:37:26 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Wed May 27 16:37:26 2015 -0700

----------------------------------------------------------------------
 .../usergrid/corepersistence/StaleIndexCleanupTest.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/02f5530e/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
index b4d4547..ab2402e 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
@@ -437,7 +437,7 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
 
             for ( int j=0; j<numUpdates; j++) {
                 toUpdate = em.get( dog.getUuid() );
-                toUpdate.setProperty( "property"  + j, RandomStringUtils.randomAlphanumeric(10));
+                toUpdate.setProperty( "property", RandomStringUtils.randomAlphanumeric(10));
                 em.update(toUpdate);
                 count++;
                 if ( count % 100 == 0 ) {
@@ -451,11 +451,15 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
 
         // wait for indexes to be cleared for the deleted entities
         count = 0;
+
         do {
+            //trigger the repair
+            queryCollectionEm("dogs", "select *");
+            app.refreshIndex();
             crs = queryCollectionCp("dogs", "dog", "select *");
         } while ( crs.size() != numEntities && count++ < 15 );
 
-        Assert.assertEquals("Expect candidates without earlier stale entities", crs.size(), numEntities);
+        Assert.assertEquals("Expect candidates without earlier stale entities", numEntities,crs.size());
     }