dsmiley commented on a change in pull request #1970: URL: https://github.com/apache/lucene-solr/pull/1970#discussion_r502934674
########## File path: solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformerHierarchy.java ########## @@ -136,12 +136,28 @@ public void testParentFilterLimitJSON() throws Exception { } @Test - public void testLiveDocs() throws Exception { + public void testWithDeletedChildren() throws Exception { + // add a doc to create another segment + final String addNonTestedDoc = + "{\n" + + "\"add\": {\n" + + "\"doc\": {\n" + + "\"id\": " + -1000 + ", \n" + + "\"type_s\": \"cake\", \n" + + "}\n" + + "}\n" + + "}"; + indexSampleData(numberOfDocsPerNestedTest); // delete toppings path assertU(delQ("_nest_path_:\\/toppings")); assertU(commit()); + if (random().nextBoolean()) { Review comment: Did you get this to trip the bug you had? I'd be surprised/baffled if so. The non-tested doc needs to be added _before_ the document you are testing so that you sometimes shift the document being tested into a segment that isn't the first one. Otherwise `segBaseId` will always be 0 and won't expose the bug. Make sense? ---------------------------------------------------------------- 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