epugh opened a new pull request, #4042:
URL: https://github.com/apache/solr/pull/4042

   https://issues.apache.org/jira/browse/SOLR-18068
   
   
   
   # Description
   
   Experimenting with how to move us from extending SolrTestCaseJ4 and using 
`initCore` to using a SolrTestRule
   
   # Solution
   
   I didn't want to change any of the assert logic like:
   
   ```
    assertQ(
           req("qt", URI, "q", "the f", SpellingParams.SPELLCHECK_COUNT, "4"),
           "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='the 
f']/int[@name='numFound'][.='3']",
           "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='the 
f']/arr[@name='suggestion']/str[1][.='the final phrase']",
           "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='the 
f']/arr[@name='suggestion']/str[2][.='the fifth phrase']",
           "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='the 
f']/arr[@name='suggestion']/str[3][.='the first phrase']");
   ```
   It is all xpath based, and to change that to the json equivalents would be a 
lot of error prone work.  
   
   I introduced a class `SolrXPathTestCase` between `TestPhraseSuggestions` and 
`SolrTestCase`, cutting out the old extension on `SolrTestCaseJ4`.   I then 
added the `req` and `assertQ` methods to that class, but with the various new 
types.
   
   # Tests
   
   Modified existing test and made sure it still passes.  
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to