Repository: incubator-usergrid Updated Branches: refs/heads/two-dot-o-dev 852c9747b -> 07b83e3bf
reduce it query size Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/7712f88d Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/7712f88d Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/7712f88d Branch: refs/heads/two-dot-o-dev Commit: 7712f88d58a5065c6cec09f78589ee6a1e0092b2 Parents: 0141623 Author: Shawn Feldman <sfeld...@apache.org> Authored: Thu Apr 23 10:57:29 2015 -0600 Committer: Shawn Feldman <sfeld...@apache.org> Committed: Thu Apr 23 10:57:29 2015 -0600 ---------------------------------------------------------------------- .../persistence/query/CollectionIoHelper.java | 1 - .../persistence/query/IteratingQueryIT.java | 19 ++++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7712f88d/stack/core/src/test/java/org/apache/usergrid/persistence/query/CollectionIoHelper.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/CollectionIoHelper.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/CollectionIoHelper.java index 8cc3b73..f34ca5b 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/CollectionIoHelper.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/CollectionIoHelper.java @@ -55,7 +55,6 @@ public class CollectionIoHelper implements IoHelper { @Override public Results getResults( Query query ) throws Exception { - app.refreshIndex(); return app.getEntityManager().searchCollection( app.getEntityManager().getApplicationRef(), "tests", query ); } } http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7712f88d/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 3afc279..46c6b6a 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 @@ -282,7 +282,7 @@ public class IteratingQueryIT { io.doSetup(); - int size = 200; + int size = 20; int queryLimit = Query.MAX_LIMIT; long start = System.currentTimeMillis(); @@ -336,7 +336,7 @@ public class IteratingQueryIT { io.doSetup(); - int size = 700; + int size = 70; int queryLimit = Query.MAX_LIMIT; // the number of entities that should be written including an intersection @@ -366,14 +366,12 @@ public class IteratingQueryIT { } } app.refreshIndex(); - Thread.sleep(500); - long stop = System.currentTimeMillis(); LOG.info( "Writes took {} ms", stop - start ); - Query query = Query.fromQL( "select * where intersect = true sort by created" ); + Query query = Query.fromQL( "select * where intersect = true sort by created asc" ); query.setLimit( queryLimit ); int count = 0; @@ -387,7 +385,7 @@ public class IteratingQueryIT { // now do simple ordering, should be returned in order results = io.getResults( query ); - for ( int i = 0; i < results.size(); i++ ) { + for ( int i = 0 ; i< results.size(); i++) { assertEquals( expected.get( count ), results.getEntities().get( i ).getName() ); count++; } @@ -406,7 +404,7 @@ public class IteratingQueryIT { protected void singleOrderByComplexIntersection( IoHelper io ) throws Exception { - int size = 200; + int size = 20; int queryLimit = Query.MAX_LIMIT; // the number of entities that should be written including an intersection @@ -477,7 +475,7 @@ public class IteratingQueryIT { protected void singleOrderByNoIntersection( IoHelper io ) throws Exception { io.doSetup(); - int size = 200; + int size = 20; int queryLimit = Query.MAX_LIMIT; // the number of entities that should be written including an intersection @@ -521,7 +519,7 @@ public class IteratingQueryIT { io.doSetup(); - int size = 200; + int size = 20; int queryLimit = Query.MAX_LIMIT; // the number of entities that should be written including an intersection @@ -591,7 +589,7 @@ public class IteratingQueryIT { io.doSetup(); - int size = 200; + int size = 20; int queryLimit = Query.MAX_LIMIT; // the number of entities that should be written including an intersection @@ -1106,7 +1104,6 @@ public class IteratingQueryIT { LOG.info( "Writes took {} ms", stop - start ); app.refreshIndex(); - Thread.sleep(500); Query query = new Query(); query.setLimit( 10 );