ChrisHegarty commented on code in PR #12903:
URL: https://github.com/apache/lucene/pull/12903#discussion_r1422222033
##########
lucene/core/src/test/org/apache/lucene/util/bkd/TestDocIdsWriter.java:
##########
@@ -150,4 +154,18 @@ public Relation compare(byte[] minPackedValue, byte[]
maxPackedValue) {
}
dir.deleteFile("tmp");
}
+
+ // This simple test tickles a JVM JIT crash on JDK's less than 21.0.1
+ // Needs to be run with C2, so with the environment variable `CI` set
+ public void testCrash() throws IOException {
+ for (int i = 0; i < 100; i++) {
+ try (Directory dir = newDirectory();
+ IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null))) {
+ for (int d = 0; d < 20_000; d++) {
+ iw.addDocument(
+ List.of(new IntPoint("foo", 0), new
SortedNumericDocValuesField("bar", 0)));
+ }
+ }
+ }
+ }
Review Comment:
Reworked the test as suggested by @dweiss. Now only runs if CI is set
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]