usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [6/8] usergrid git commit: fixed tests so edges don't get left behind
Date Fri, 04 Sep 2015 13:42:06 GMT
fixed tests so edges don't get left behind


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

Branch: refs/heads/two-dot-o-dev
Commit: d21deaaa4a466e14593afc6c778e823c5aaef577
Parents: a691ada
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Sep 3 17:28:13 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Sep 3 17:28:13 2015 -0600

----------------------------------------------------------------------
 .../apache/usergrid/persistence/ApplicationServiceIT.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/d21deaaa/stack/core/src/test/java/org/apache/usergrid/persistence/ApplicationServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/ApplicationServiceIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/ApplicationServiceIT.java
index d438304..9b20f72 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/ApplicationServiceIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/ApplicationServiceIT.java
@@ -84,10 +84,14 @@ public class ApplicationServiceIT extends AbstractCoreIT {
 
         Iterator<Edge> results = graphManager.loadEdgesFromSource(simpleSearchByEdgeType).toBlocking().getIterator();
         if(results.hasNext()){
-            Assert.fail();
-           
-        }else{
+            Assert.fail("should be empty");
 
+        }else{
+            Results searchCollection = entityManager.searchCollection(entityManager.getApplication(),
"tests", Query.all());
+            Assert.assertEquals(searchCollection.size(),0);
+            AggregationServiceFactory aggregationServiceFactory = injector.getInstance(AggregationServiceFactory.class);
+            long size = aggregationServiceFactory.getAggregationService().getCollectionSize(appScope,"tests");
+            Assert.assertEquals(size,0);
             //success
         }
     }


Mime
View raw message