Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r212993235
--- Diff:
solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java
---
@@ -92,6 +97,18 @@ private void testChildDoctransformerXML() {
assertQ(req("q", "*:*", "fq", "subject:\"parentDocument\" ",
"fl", "subject,[child parentFilter=\"subject:parentDocument\"
childFilter=\"title:foo\"]"), test2);
+ try(SolrQueryRequest req = req("q", "*:*", "fq",
"subject:\"parentDocument\" ",
--- End diff --
Please include a comment explaining what it is you're testing here (i.e.
what is the point of this particular test); it's non-obvious to me.
This test tests manually... but it could be done more concisely using the
XPath style assertions done elsewhere in this file and most tests. For example
if you want to test the number of child documents, it'd be something like this:
"count(/response/result/doc[1]/doc)=2" and include a numFound check.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]