[ https://issues.apache.org/jira/browse/GEODE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100589#comment-16100589 ]
ASF GitHub Bot commented on GEODE-2936: --------------------------------------- Github user YehEmily commented on a diff in the pull request: https://github.com/apache/geode/pull/580#discussion_r129399374 --- Diff: geode-core/src/test/java/org/apache/geode/cache/query/internal/OrderByComparatorJUnitTest.java --- @@ -173,36 +157,58 @@ public void testUnsupportedOrderByForPR() throws Exception { @Test public void testSupportedOrderByForRR() throws Exception { - String unsupportedQueries[] = - {"select distinct p.status from /portfolio1 p order by p.status, p.ID", - - }; + {"select distinct p.status from /portfolio1 p order by p.status, p.ID"}; Object r[][] = new Object[unsupportedQueries.length][2]; - QueryService qs; - qs = CacheUtils.getQueryService(); Position.resetCounter(); - // Create Regions + // Create Regions Region r1 = CacheUtils.createRegion("portfolio1", Portfolio.class); for (int i = 0; i < 50; i++) { r1.put(new Portfolio(i), new Portfolio(i)); } for (int i = 0; i < unsupportedQueries.length; i++) { - Query q = null; - + Query q; CacheUtils.getLogger().info("Executing query: " + unsupportedQueries[i]); q = CacheUtils.getQueryService().newQuery(unsupportedQueries[i]); try { r[i][0] = q.execute(); - } catch (QueryInvalidException qe) { qe.printStackTrace(); fail(qe.toString()); } } } + /** + * Tests three cases that were not originally covered by the original tests in this class. (To --- End diff -- All good points - I've fixed this and updated the PR! > Refactor OrderByComparator's compare method to reduce redundant code > -------------------------------------------------------------------- > > Key: GEODE-2936 > URL: https://issues.apache.org/jira/browse/GEODE-2936 > Project: Geode > Issue Type: Bug > Components: querying > Reporter: nabarun > Assignee: Emily Yeh > > Issue: > OrderByComparator's compare method has a lot of redundant code. > Solution: > These code sections can be modified to have one method call -- This message was sent by Atlassian JIRA (v6.4.14#64029)