You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/08 07:42:50 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #654: LUCENE-10410: Add more tests for legacy decoding logic in DocIdsWriter

jpountz commented on a change in pull request #654:
URL: https://github.com/apache/lucene/pull/654#discussion_r801340328



##########
File path: lucene/core/src/test/org/apache/lucene/util/bkd/TestDocIdsWriter.java
##########
@@ -110,7 +111,11 @@ private void test(Directory dir, int[] ints) throws Exception {
     final long len;
     DocIdsWriter docIdsWriter = new DocIdsWriter(ints.length);
     try (IndexOutput out = dir.createOutput("tmp", IOContext.DEFAULT)) {
-      docIdsWriter.writeDocIds(ints, 0, ints.length, out);
+      if (rarely()) {
+        legacyWriteDocIds(ints, 0, ints.length, out);
+      } else {
+        docIdsWriter.writeDocIds(ints, 0, ints.length, out);
+      }

Review comment:
       Can you extract it to a separate test, so that we'd have both a `testLegacy` and `test`? I think it'd make it easier to get a sense of where the bug lies when we see a test failure.




-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org