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:44:29 UTC
svn commit: r1696870 - in /lucene/dev/branches/branch_5x/lucene/join: ./
src/test/org/apache/lucene/search/join/TestBlockJoin.java
Author: hossman
Date: Thu Aug 20 22:44:28 2015
New Revision: 1696870
URL: http://svn.apache.org/r1696870
Log:
LUCENE-6755: fix test bug and increase num of docs to improve chances of random query matching (merge r1696867)
Modified:
lucene/dev/branches/branch_5x/lucene/join/ (props changed)
lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
Modified: lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java?rev=1696870&r1=1696869&r2=1696870&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java (original)
+++ lucene/dev/branches/branch_5x/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java Thu Aug 20 22:44:28 2015
@@ -1648,16 +1648,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));
}
@@ -1678,7 +1678,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)),