dsmiley commented on a change in pull request #2088: URL: https://github.com/apache/lucene-solr/pull/2088#discussion_r528013594
########## File path: lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java ########## @@ -187,4 +187,23 @@ public void testMergedFieldInfos_singleLeaf() throws IOException { writer.close(); dir.close(); } + + public void testFieldNumbersAutoIncrement() { + FieldInfos.FieldNumbers fieldNumbers = new FieldInfos.FieldNumbers("softDeletes"); + for (int i = 0; i < 10; i++) { + fieldNumbers.addOrGet("field" + i, -1, IndexOptions.NONE, DocValuesType.NONE, + 0, 0, 0, 0, + VectorValues.SearchStrategy.NONE, false); + } + int idx = fieldNumbers.addOrGet("EleventhField", -1, IndexOptions.NONE, DocValuesType.NONE, + 0, 0, 0, 0, + VectorValues.SearchStrategy.NONE, false); + assertEquals("Field numbers 0 through 9 were allocated", 10, idx); + + fieldNumbers.clear(); Review comment: I agree that nothing more than what was done is _required_. My feedback reflects my low opinion of the value of some unit tests like this one. I've seen low level unit tests before that seem nice at a glance yet the component still doesn't work as intended due to other reasons. From the conversation over the course of today I see here... it seems my point has some credence ;-) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org