You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/01/14 14:11:17 UTC
[lucene-solr] branch master updated: LUCENE-8636: TestPointQueries
times out on nightly (decreased big range to 50k,
excluded simple text codec).
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new d965b35 LUCENE-8636: TestPointQueries times out on nightly (decreased big range to 50k, excluded simple text codec).
d965b35 is described below
commit d965b3547e2fb87cb7551687bae312a0ff62e526
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Mon Jan 14 14:12:45 2019 +0100
LUCENE-8636: TestPointQueries times out on nightly (decreased big range to 50k, excluded simple text codec).
---
.../org/apache/lucene/search/TestPointQueries.java | 25 ++++++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
index 90df7c3..29997f1 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
@@ -72,6 +72,7 @@ import org.apache.lucene.util.TestUtil;
import org.apache.lucene.util.bkd.BKDWriter;
import org.junit.BeforeClass;
+@LuceneTestCase.SuppressCodecs("SimpleText")
public class TestPointQueries extends LuceneTestCase {
// Controls what range of values we randomly generate, so we sometimes test narrow ranges:
@@ -355,7 +356,7 @@ public class TestPointQueries extends LuceneTestCase {
@Nightly
public void testRandomLongsBig() throws Exception {
- doTestRandomLongs(100000);
+ doTestRandomLongs(50000);
}
private void doTestRandomLongs(int count) throws Exception {
@@ -613,7 +614,7 @@ public class TestPointQueries extends LuceneTestCase {
@Nightly
public void testRandomBinaryBig() throws Exception {
- doTestRandomBinary(100000);
+ doTestRandomBinary(50000);
}
private void doTestRandomBinary(int count) throws Exception {
@@ -632,7 +633,10 @@ public class TestPointQueries extends LuceneTestCase {
int[] ids = new int[numValues];
int id = 0;
- for(int ord=0;ord<numValues;ord++) {
+ if (VERBOSE) {
+ System.out.println("Picking values: " + numValues);
+ }
+ for (int ord = 0; ord < numValues; ord++) {
if (ord > 0 && random().nextInt(100) < sameValuePct) {
// Identical to old value
docValues[ord] = docValues[random().nextInt(ord)];
@@ -695,7 +699,12 @@ public class TestPointQueries extends LuceneTestCase {
Document doc = null;
int lastID = -1;
- for(int ord=0;ord<numValues;ord++) {
+ for (int ord = 0; ord < numValues; ord++) {
+ if (ord % 1000 == 0) {
+ if (VERBOSE) {
+ System.out.println("Adding docs: " + ord);
+ }
+ }
int id = ids[ord];
if (id != lastID) {
if (random().nextInt(100) < missingPct) {
@@ -759,7 +768,7 @@ public class TestPointQueries extends LuceneTestCase {
final CountDownLatch startingGun = new CountDownLatch(1);
final AtomicBoolean failed = new AtomicBoolean();
- for(int i=0;i<numThreads;i++) {
+ for (int i = 0; i < numThreads; i++) {
Thread thread = new Thread() {
@Override
public void run() {
@@ -834,7 +843,7 @@ public class TestPointQueries extends LuceneTestCase {
}
BitSet expected = new BitSet();
- for(int ord=0;ord<numValues;ord++) {
+ for (int ord = 0; ord < numValues; ord++) {
int id = ids[ord];
if (missing.get(id) == false && deleted.get(id) == false && matches(bytesPerDim, lower, upper, docValues[ord])) {
expected.set(id);
@@ -865,10 +874,12 @@ public class TestPointQueries extends LuceneTestCase {
thread.start();
threads.add(thread);
}
+
startingGun.countDown();
- for(Thread thread : threads) {
+ for (Thread thread : threads) {
thread.join();
}
+
IOUtils.close(r, dir);
}