Author: chetanm
Date: Wed Oct 15 10:18:34 2014
New Revision: 1631990

URL: http://svn.apache.org/r1631990
Log:
OAK-2196 - Implement sorting based on Lucene sorting

Fixed the failing testcase which was failing because for duplicate dates the 
order of path would be ambiguous.  As a fix the test data creation logic would 
now create unique random dates

Modified:
    
jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java

Modified: 
jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java?rev=1631990&r1=1631989&r2=1631990&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndexTest.java
 Wed Oct 15 10:18:34 2014
@@ -283,7 +283,6 @@ public class LucenePropertyIndexTest ext
         assertOrderedQuery("select [jcr:path] from [nt:base] where [bar] = 
'baz' order by [foo] DESC", getSortedPaths(tuples, OrderDirection.DESC));
     }
 
-    @Ignore("OAK-2196")
     @Test
     public void sortQueriesWithDate() throws Exception {
         Tree idx = createIndex("test1", of("foo", "bar"));
@@ -415,7 +414,7 @@ public class LucenePropertyIndexTest ext
         Random rnd = new Random();
         List<Calendar> values = Lists.newArrayListWithCapacity(n);
         for (long i = 0; i < n; i++){
-            values.add(createCal(String.format("%02d/%02d/2014", 
rnd.nextInt(29) + 1, rnd.nextInt(11) + 1)));
+            values.add(createCal(String.format("%02d/%02d/2%03d", 
rnd.nextInt(26) + 1, rnd.nextInt(10) + 1,i)));
         }
         Collections.shuffle(values);
         return values;


Reply via email to