[jira] [Updated] (SOLR-8758) Add SolrCloudTestCase base class

2016-04-21 Thread Anshum Gupta (JIRA)

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

Anshum Gupta updated SOLR-8758:
---
Fix Version/s: 5.5.1

> Add SolrCloudTestCase base class
> 
>
> Key: SOLR-8758
> URL: https://issues.apache.org/jira/browse/SOLR-8758
> Project: Solr
>  Issue Type: Improvement
>Reporter: Alan Woodward
> Fix For: 6.0, 5.5.1
>
> Attachments: SOLR-8758.patch
>
>
> At the moment, if you want to write unit tests for Cloud components, you have 
> to extend AbstractDistribZkTestCase, which has a number of disadvantages:
> * the API isn't well-documented
> * you get a default configuration loaded into ZK, and it's not trivial to add 
> separate ones
> * you get a default collection, whether you want one or not
> * the test cluster isn't static, which means that it's started up and 
> shutdown after every test function.  To avoid tests being incredibly slow, we 
> end up writing single-function tests that call out to sub-functions, losing 
> the benefits of execution-order randomization.
> It would be more useful to have a properly configurable and documented 
> testcase base class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Updated] (SOLR-8758) Add SolrCloudTestCase base class

2016-02-29 Thread Alan Woodward (JIRA)

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

Alan Woodward updated SOLR-8758:

Attachment: SOLR-8758.patch

Here's a patch.  The base class uses a MiniSolrCloudCluster, and exposes a 
Builder interface to configure it.  You can give it a solr.xml (either as a 
Path or a String), and add configs that will be uploaded when the cluster 
starts.

I initially wanted to implement this as a junit ExternalResource that could be 
added as a ClassRule, but unfortunately this puts it outside the 
BeforeClass/AfterClass boundaries of LuceneTestCase and it falls foul of things 
like the ThreadLeak tracker.

> Add SolrCloudTestCase base class
> 
>
> Key: SOLR-8758
> URL: https://issues.apache.org/jira/browse/SOLR-8758
> Project: Solr
>  Issue Type: Improvement
>Reporter: Alan Woodward
> Attachments: SOLR-8758.patch
>
>
> At the moment, if you want to write unit tests for Cloud components, you have 
> to extend AbstractDistribZkTestCase, which has a number of disadvantages:
> * the API isn't well-documented
> * you get a default configuration loaded into ZK, and it's not trivial to add 
> separate ones
> * you get a default collection, whether you want one or not
> * the test cluster isn't static, which means that it's started up and 
> shutdown after every test function.  To avoid tests being incredibly slow, we 
> end up writing single-function tests that call out to sub-functions, losing 
> the benefits of execution-order randomization.
> It would be more useful to have a properly configurable and documented 
> testcase base class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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