Skip to content

Commit 3755418

Browse files
authored
test: remove slow test for java 21 bug (#15310)
This test never runs on my system (I never let tests get a C2, its too slow). But its very slow in CI: probably because it makes many writers, probably fsyncs a lot, etc. Given that `main` is on java 25 I think we can remove the java 21 test?
1 parent b4b8047 commit 3755418

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lucene/core/src/test/org/apache/lucene/util/bkd/TestDocIdsWriter.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818

1919
import java.io.IOException;
2020
import java.util.Arrays;
21-
import java.util.List;
2221
import java.util.Set;
23-
import org.apache.lucene.document.IntPoint;
24-
import org.apache.lucene.document.SortedNumericDocValuesField;
25-
import org.apache.lucene.index.IndexWriter;
2622
import org.apache.lucene.index.PointValues.IntersectVisitor;
2723
import org.apache.lucene.index.PointValues.Relation;
2824
import org.apache.lucene.store.Directory;
@@ -32,7 +28,6 @@
3228
import org.apache.lucene.tests.util.LuceneTestCase;
3329
import org.apache.lucene.tests.util.TestUtil;
3430
import org.apache.lucene.util.CollectionUtil;
35-
import org.apache.lucene.util.Constants;
3631

3732
public class TestDocIdsWriter extends LuceneTestCase {
3833

@@ -169,23 +164,4 @@ public Relation compare(byte[] minPackedValue, byte[] maxPackedValue) {
169164
}
170165
dir.deleteFile("tmp");
171166
}
172-
173-
// This simple test tickles a JVM C2 JIT crash on JDK's less than 21.0.1
174-
// Crashes only when run with HotSpot C2.
175-
// Regardless of whether C2 is enabled or not, the test should never fail.
176-
public void testCrash() throws IOException {
177-
assumeTrue(
178-
"Requires HotSpot C2 compiler (won't work on client VM).",
179-
Constants.IS_HOTSPOT_VM && !Constants.IS_CLIENT_VM);
180-
int itrs = atLeast(100);
181-
for (int i = 0; i < itrs; i++) {
182-
try (Directory dir = newDirectory();
183-
IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null))) {
184-
for (int d = 0; d < 20_000; d++) {
185-
iw.addDocument(
186-
List.of(new IntPoint("foo", 0), new SortedNumericDocValuesField("bar", 0)));
187-
}
188-
}
189-
}
190-
}
191167
}

0 commit comments

Comments
 (0)