usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [1/3] git commit: test fixes
Date Tue, 04 Nov 2014 15:17:28 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o 63fb7df9e -> 5285f3d59
  refs/heads/two-dot-o-events 4a36aa16c -> a3cfd56b6


test fixes


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

Branch: refs/heads/two-dot-o-events
Commit: a3cfd56b6d4a0e5043549a6c64b7067554a2167b
Parents: 4a36aa1
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Oct 31 15:55:19 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Oct 31 15:55:19 2014 -0400

----------------------------------------------------------------------
 .../usergrid/corepersistence/StaleIndexCleanupTest.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a3cfd56b/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 ff740af..3dd63c0 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
@@ -208,7 +208,7 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
      * Test that the EntityDeleteImpl cleans up stale indexes on delete. Ensures that when
an 
      * entity is deleted its old indexes are cleared from ElasticSearch.
      */
-    @Test
+    @Test(timeout=10000)
     public void testCleanupOnDelete() throws Exception {
 
         logger.info("Started testStaleIndexCleanup()");
@@ -274,7 +274,7 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
         do {
             Thread.sleep(100);
             crs = queryCollectionCp("things", "select *");
-        } while ( crs.size() > 0 || count++ < 14 );
+        } while ( crs.size() > 0 && count++ < 14 );
 
         Assert.assertEquals( "Expect no candidates", 0, crs.size() );
     }
@@ -284,7 +284,7 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
      * Test that the EntityDeleteImpl cleans up stale indexes on update. Ensures that when
an 
      * entity is updated its old indexes are cleared from ElasticSearch.
      */
-    @Test
+    @Test(timeout=10000)
     public void testCleanupOnUpdate() throws Exception {
 
         logger.info("Started testCleanupOnUpdate()");
@@ -340,12 +340,12 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
         Assert.assertEquals( "Expect stale candidates", numEntities * (numUpdates + 1), crs.size());
 
         // wait for indexes to be cleared for the deleted entities
-        count = 0;
         do {
             Thread.sleep(100);
             crs = queryCollectionCp("things", "select *");
-        } while ( crs.size() > 0 || count++ < 14 );
+        } while ( crs.size() > 0 );
 
+        // will never get here if test times out
         Assert.assertEquals( "Expect no candidates", 0, crs.size() );
     }
 


Mime
View raw message