Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r210276463
--- Diff:
solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformerHierarchy.java
---
@@ -83,6 +84,57 @@ public void testParentFilterJSON() throws Exception {
tests);
}
+ @Test
+ public void testParentFilterLimitJSON() throws Exception {
+ indexSampleData(10);
+ String[] tests = new String[] {
--- End diff --
why define these tests up front? The vast majority of "assertJQ" or
similar calls I've seen in Solr's tests put them inline at the method call,
which I think makes the most sense since it's together with the query. And can
the length be checked here? I think that's a key element of this test's
purpose :-) BTW if you use the XML based assertions, you have a richer
language to work with -- XPath. The json-like assertJQ is some home-grown
thing in this project that supposedly is easier for people to understand due to
the json-like nature (industry shifts from XML to JSON) but it's limited in
capability. I'm not sure if assertJQ can assert an array length but you could
investigate.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]