You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/09/04 01:47:48 UTC
usergrid git commit: changing observable and tests
Repository: usergrid
Updated Branches:
refs/heads/USERGRID-938 d21deaaa4 -> c90b6427a
changing observable and tests
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c90b6427
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c90b6427
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c90b6427
Branch: refs/heads/USERGRID-938
Commit: c90b6427a032cb878b730cf1b3f5a493d2a3f417
Parents: d21deaa
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Sep 3 17:47:43 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Sep 3 17:47:43 2015 -0600
----------------------------------------------------------------------
.../service/ApplicationServiceImpl.java | 14 ++++++--------
.../org/apache/usergrid/rest/SystemResourceIT.java | 3 ++-
2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c90b6427/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ApplicationServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ApplicationServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ApplicationServiceImpl.java
index 2e4700a..42d5e51 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ApplicationServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ApplicationServiceImpl.java
@@ -85,15 +85,13 @@ public class ApplicationServiceImpl implements ApplicationService{
Observable<Id> countObservable = allEntityIdsObservable.getEntities(appObservable)
//.map(entity -> eventBuilder.buildEntityDelete(applicationScope, entity.getId()).getEntitiesCompacted())
.map(entityIdScope -> ((EntityIdScope) entityIdScope).getId())
- .skip(1)
+ .skip(1)//skip application entity
.map(id -> {
- return entityCollectionManager.mark((Id) id)
- .mergeWith(graphManager.markNode((Id) id, createGraphOperationTimestamp()))
- .map(id2 -> id).toBlocking().last();
- }
- ).doOnNext(id -> deleteAsync(mapManager ,applicationScope, (Id) id));
-
-
+ entityCollectionManager.mark((Id) id)
+ .mergeWith(graphManager.markNode((Id) id, createGraphOperationTimestamp())).toBlocking().last();
+ return id;
+ })
+ .doOnNext(id -> deleteAsync(mapManager, applicationScope, (Id) id));
return countObservable;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c90b6427/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
index 5c89422..4523b56 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/SystemResourceIT.java
@@ -25,6 +25,7 @@ import org.apache.usergrid.rest.test.resource.model.QueryParameters;
import java.util.LinkedHashMap;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -60,7 +61,7 @@ public class SystemResourceIT extends AbstractRestIT {
assertNotNull( result );
assertNotNull( "ok",result.getStatus() );
- assertTrue((int)((LinkedHashMap)result.getData()).get("count")==4);
+ assertEquals(((LinkedHashMap) result.getData()).get("count"), 3);
}