You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2015/08/21 00:24:15 UTC

svn commit: r1696867 - /lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java

Author: hossman
Date: Thu Aug 20 22:24:15 2015
New Revision: 1696867

URL: http://svn.apache.org/r1696867
Log:
LUCENE-6755: fix test bug and increase num of docs to improve chances of random query matching

Modified:
    lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java

Modified: lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java?rev=1696867&r1=1696866&r2=1696867&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java (original)
+++ lucene/dev/trunk/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java Thu Aug 20 22:24:15 2015
@@ -1674,16 +1674,16 @@ public class TestBlockJoin extends Lucen
     final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
 
     // randomly generate resume->jobs[]->qualifications[]
-    final int numResumes = atLeast(50);
+    final int numResumes = atLeast(100);
     for (int r = 0; r < numResumes; r++) {
       final List<Document> docs = new ArrayList<>();
       
       final int rv = TestUtil.nextInt(random(), 1, 10);
-      final int numJobs = atLeast(1);
+      final int numJobs = atLeast(10);
       for (int j = 0; j < numJobs; j++) {
-        final int jv = TestUtil.nextInt(random(), 1, 10);
+        final int jv = TestUtil.nextInt(random(), -10, -1); // neg so no overlap with q (both used for "year")
 
-        final int numQualifications = atLeast(1);
+        final int numQualifications = atLeast(10);
         for (int q = 0; q < numQualifications; q++) {
           docs.add(makeQualification("q" + q + "_rv" + rv + "_jv" + jv, q));
         }
@@ -1704,7 +1704,7 @@ public class TestBlockJoin extends Lucen
 
     final int numQueryIters = atLeast(1);
     for (int i = 0; i < numQueryIters; i++) {
-      final int qjv = TestUtil.nextInt(random(), 1, 10);
+      final int qjv = TestUtil.nextInt(random(), -10, -1);
       final int qrv = TestUtil.nextInt(random(), 1, 10);
       
       Query resumeQuery = new ToChildBlockJoinQuery(new TermQuery(new Term("country","rv" + qrv)),