Repository: incubator-usergrid Updated Branches: refs/heads/USERGRID-903 [created] 0a78e1544
Added test proving issue. Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/c6f1dbe3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/c6f1dbe3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/c6f1dbe3 Branch: refs/heads/USERGRID-903 Commit: c6f1dbe3c2f562c184abaec128972242366c6542 Parents: 6b90b66 Author: GERey <gre...@apigee.com> Authored: Tue Aug 4 12:55:21 2015 -0700 Committer: GERey <gre...@apigee.com> Committed: Tue Aug 4 12:55:21 2015 -0700 ---------------------------------------------------------------------- .../rest/applications/queries/OrderByTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c6f1dbe3/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/OrderByTest.java ---------------------------------------------------------------------- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/OrderByTest.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/OrderByTest.java index 99a2a77..2a16d96 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/OrderByTest.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/OrderByTest.java @@ -60,6 +60,23 @@ public class OrderByTest extends QueryTestBase { } } + @Test + public void testValueWithSpaceAtEndStillQueryable() throws IOException { + String collectionName = "stuff"; + Entity lowerCaseEntity = new Entity(); + lowerCaseEntity.put( "name","thing1" ); + lowerCaseEntity.put( "random","fury " ); + + this.app().collection( collectionName ).post( lowerCaseEntity ); + + refreshIndex(); + + QueryParameters params = new QueryParameters() + .setQuery("select * where random = 'fury' "); + Collection activities = this.app().collection(collectionName).get(params); + assertEquals(1, activities.getResponse().getEntityCount()); + assertEquals( "fury",activities.getResponse().getEntities().get( 0 ).get( "random" ) ); + } /** * Test correct sort order for Long properties