Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-9814: fix extremely slow 7.0 backwards tests in master

Robert Muir373e1d6c83f5
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 a271a2715dd..2a71222d7c2 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 2f3fbb64c1a..47c41be0beb 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());
}