You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2021/02/27 01:28:05 UTC
[lucene-solr] branch master updated: LUCENE-9814: fix extremely
slow 7.0 backwards tests in master
This is an automated email from the ASF dual-hosted git repository.
rmuir 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 373e1d6 LUCENE-9814: fix extremely slow 7.0 backwards tests in master
new 6348c28 Merge branch 'master' of https://gitbox.apache.org/repos/asf/lucene-solr
373e1d6 is described below
commit 373e1d6c83f5d3e24c9c979acb41a36182f07097
Author: Robert Muir <rm...@apache.org>
AuthorDate: Fri Feb 26 20:24:01 2021 -0500
LUCENE-9814: fix extremely slow 7.0 backwards tests in master
The 7.0 backwards tests added to master must have come from an older
branch before they were fixed: they've added minutes to my test times.
These tests have already been fixed in master, so that the crazy
corner-case stress tests are only running slowly in jekins and we dont
have 15-30s long tests locally.
Re-applying same fixes to 7.0 tests removes minutes from my test times.
---
.../backward_codecs/lucene70/TestIndexedDISI.java | 6 ++++--
.../lucene70/TestLucene70DocValuesFormat.java | 22 ++++++++++++----------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestIndexedDISI.java b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestIndexedDISI.java
index a271a27..2a71222 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestIndexedDISI.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestIndexedDISI.java
@@ -137,7 +137,8 @@ public class TestIndexedDISI extends LuceneTestCase {
public void testFewMissingDocs() throws IOException {
try (Directory dir = newDirectory()) {
- for (int iter = 0; iter < 100; ++iter) {
+ int numIters = atLeast(10);
+ for (int iter = 0; iter < numIters; ++iter) {
int maxDoc = TestUtil.nextInt(random(), 1, 100000);
FixedBitSet set = new FixedBitSet(maxDoc);
set.set(0, maxDoc);
@@ -152,7 +153,8 @@ public class TestIndexedDISI extends LuceneTestCase {
public void testRandom() throws IOException {
try (Directory dir = newDirectory()) {
- for (int i = 0; i < 10; ++i) {
+ int numIters = atLeast(3);
+ for (int i = 0; i < numIters; ++i) {
doTestRandom(dir);
}
}
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestLucene70DocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestLucene70DocValuesFormat.java
index 2f3fbb6..47c41be 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestLucene70DocValuesFormat.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/backward_codecs/lucene70/TestLucene70DocValuesFormat.java
@@ -84,7 +84,8 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
public void testSortedSetVariableLengthBigVsStoredFields() throws Exception {
int numIterations = atLeast(1);
for (int i = 0; i < numIterations; i++) {
- doTestSortedSetVsStoredFields(atLeast(300), 1, 32766, 16, 100);
+ int numDocs = TEST_NIGHTLY ? atLeast(100) : atLeast(10);
+ doTestSortedSetVsStoredFields(numDocs, 1, 32766, 16, 100);
}
}
@@ -100,7 +101,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
public void testSortedVariableLengthBigVsStoredFields() throws Exception {
int numIterations = atLeast(1);
for (int i = 0; i < numIterations; i++) {
- doTestSortedVsStoredFields(atLeast(300), 1d, 1, 32766);
+ doTestSortedVsStoredFields(atLeast(100), 1d, 1, 32766);
}
}
@@ -112,7 +113,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
- @Slow
+ @Nightly
public void testTermsEnumFixedWidth() throws Exception {
int numIterations = atLeast(1);
for (int i = 0; i < numIterations; i++) {
@@ -122,7 +123,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
- @Slow
+ @Nightly
public void testTermsEnumVariableWidth() throws Exception {
int numIterations = atLeast(1);
for (int i = 0; i < numIterations; i++) {
@@ -142,6 +143,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
+ @Nightly
public void testTermsEnumLongSharedPrefixes() throws Exception {
int numIterations = atLeast(1);
for (int i = 0; i < numIterations; i++) {
@@ -446,7 +448,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
- @Slow
+ @Nightly
public void testSortedSetAroundBlockSize() throws IOException {
final int frontier = 1 << Lucene70DocValuesFormat.DIRECT_MONOTONIC_BLOCK_SHIFT;
for (int maxDoc = frontier - 1; maxDoc <= frontier + 1; ++maxDoc) {
@@ -499,7 +501,7 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
- @Slow
+ @Nightly
public void testSortedNumericAroundBlockSize() throws IOException {
final int frontier = 1 << Lucene70DocValuesFormat.DIRECT_MONOTONIC_BLOCK_SHIFT;
for (int maxDoc = frontier - 1; maxDoc <= frontier + 1; ++maxDoc) {
@@ -540,22 +542,22 @@ public class TestLucene70DocValuesFormat extends BaseCompressingDocValuesFormatT
}
}
- @Slow
+ @Nightly
public void testSortedNumericBlocksOfVariousBitsPerValue() throws Exception {
doTestSortedNumericBlocksOfVariousBitsPerValue(() -> TestUtil.nextInt(random(), 1, 3));
}
- @Slow
+ @Nightly
public void testSparseSortedNumericBlocksOfVariousBitsPerValue() throws Exception {
doTestSortedNumericBlocksOfVariousBitsPerValue(() -> TestUtil.nextInt(random(), 0, 2));
}
- @Slow
+ @Nightly
public void testNumericBlocksOfVariousBitsPerValue() throws Exception {
doTestSparseNumericBlocksOfVariousBitsPerValue(1);
}
- @Slow
+ @Nightly
public void testSparseNumericBlocksOfVariousBitsPerValue() throws Exception {
doTestSparseNumericBlocksOfVariousBitsPerValue(random().nextDouble());
}