You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/01/12 22:17:36 UTC
[3/4] usergrid git commit: Removed comments and added additional
error checking to the test.
Removed comments and added additional error checking to the test.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e8a842b9
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e8a842b9
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e8a842b9
Branch: refs/heads/master
Commit: e8a842b934574cfee19a90366f9f86e769dde97f
Parents: bdec019
Author: George Reyes <gr...@apache.org>
Authored: Mon Jan 11 15:19:55 2016 -0800
Committer: George Reyes <gr...@apache.org>
Committed: Mon Jan 11 15:19:55 2016 -0800
----------------------------------------------------------------------
.../org/apache/usergrid/persistence/GeoIT.java | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/e8a842b9/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
index 33aeb00..b7d708e 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
@@ -70,16 +70,9 @@ public class GeoIT extends AbstractCoreIT {
super();
}
- /**
- * Validate the ability to remove an entity's location and remove them from searches
- * 1. Create an entity with location
- * 2. Query with a globally large distance to verify location
- * 3. Remove the entity's location
- * 4. Repeat the query, expecting no results
- */
+
@Test
public void testRoundingGeolocationIssue() throws Exception {
- //Get the EntityManager instance
EntityManager em = app.getEntityManager();
assertNotNull(em);
@@ -107,9 +100,14 @@ public class GeoIT extends AbstractCoreIT {
//2. Query with a globally large distance to verify location
- Query query = Query.fromQL("select * where location within 609.8 of 37.334110260009766, -121.89434051513672");
+ Query query = Query.fromQL("select * where location within 609.7 of 37.334110260009766, -121.89434051513672");
Results listResults = em.searchCollection(em.getApplicationRef(), "collars", query);
- assertEquals("Nothing should get returned", 0, listResults.size());
+ assertEquals( 5, listResults.size());
+
+ query = Query.fromQL("select * where location within 609.8 of 37.334110260009766, -121.89434051513672");
+ listResults = em.searchCollection(em.getApplicationRef(), "collars", query);
+ assertEquals( 6, listResults.size());
+
}