jpountz commented on a change in pull request #2186: URL: https://github.com/apache/lucene-solr/pull/2186#discussion_r590479158
########## File path: lucene/test-framework/src/java/org/apache/lucene/index/BaseVectorFormatTestCase.java ########## @@ -131,7 +115,8 @@ public void testIllegalDimChangeTwoDocs() throws Exception { Document doc = new Document(); doc.add(new VectorField("f", new float[4], VectorValues.SearchStrategy.DOT_PRODUCT_HNSW)); w.addDocument(doc); - if (random().nextBoolean()) { + boolean rb = random().nextBoolean(); + if (rb) { Review comment: nit: maybe we should make sure we test both branches all the time to have good coverage, especially now that the error messages differ? (and likewise for other places that have similar logic) ########## File path: lucene/test-framework/src/java/org/apache/lucene/index/BasePointsFormatTestCase.java ########## @@ -1174,8 +1174,11 @@ public void testMixedSchema() throws Exception { Document doc = new Document(); doc.add(new IntPoint("id", 0)); - w.addDocument(doc); - // now we write another segment where the id field does have points: + IllegalArgumentException ex = + expectThrows(IllegalArgumentException.class, () -> w.addDocument(doc)); + assertEquals( + "cannot change field \"id\" from index options=DOCS to inconsistent index options=NONE", + ex.getMessage()); Review comment: I think we should refactor or drop this test, as it is not testing the points format now, but IndexingChain/FieldsInfos' logic. Maybe we could rename the test `testMergeMissing` and configure the first segment to not have the `id` field at all. ---------------------------------------------------------------- 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