[ 
https://issues.apache.org/jira/browse/SOLR-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated SOLR-2002:
------------------------------

    Attachment: SOLR-2002setupteardown.patch

when switching solr's base tests to extend lucene's, i noticed if you override 
setUp(), but neglected to call super.setUp(), you would get a strange exception:
java.lang.IllegalArgumentException: maxClauseCount must be >= 1
http://www.lucidimagination.com/search/document/f7769140c3557c78/error_in_building_solr_cloud_ant_example

This is because the code in tearDown to restore the max clause count restores 
an uninitialized (zero) saved clause count.
(I actually found this helpful once i understood what was happening).

This patch changes this to explicit asserts, which are more helpful and tell 
you if you forgot to call super.setUp() or super.tearDown() when you override 
these methods.

> improve build/tests
> -------------------
>
>                 Key: SOLR-2002
>                 URL: https://issues.apache.org/jira/browse/SOLR-2002
>             Project: Solr
>          Issue Type: Task
>          Components: Build
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: SOLR-2002.patch, SOLR-2002setupteardown.patch
>
>
> we are working on improving some functionality in lucene's build/tests, it 
> would be good to improve the solr side to take advantage of it.
> currently its only sorta-kinda integrated and a bit messy.
> i'd like to do some incremental improvements piece-by-piece on this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to