[ https://issues.apache.org/jira/browse/SOLR-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Chanan updated SOLR-5865: --------------------------------- Attachment: SOLR-5865.patch Here's a patch that implements a MiniSolrCloudCluster and a simple test exercising it. The test doesn't use the normal LuceneTestCase test class hierarchy, because that is one of the motivations for the MiniSolrCloudCluster: that downstream projects will want to use their own test framework. One limitation on the test currently is it does not start a MiniDFSCluster, as the code necessary for that lives in solr/core rather than the test framework. I'm not 100% sure why that is, but if no one has an objection I'll go ahead and make that change in a later patch. To demonstrate to myself that this is useful, I implemented one of the Apache Sentry tests using this test framework rather than AbstractFullDistribZkTestBase. See the current state of the test here: https://github.com/apache/incubator-sentry/blob/644e8be346a152e43fa435b9adbb47ce6b3e3e91/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/AbstractSolrSentryTestBase.java. This was pretty straightforward, with the exception of getting the MiniDFSCluster stuff correct, as mentioned above. > Provide a MiniSolrCloudCluster to enable easier testing > ------------------------------------------------------- > > Key: SOLR-5865 > URL: https://issues.apache.org/jira/browse/SOLR-5865 > Project: Solr > Issue Type: Improvement > Components: SolrCloud > Affects Versions: 4.7, 5.0 > Reporter: Gregory Chanan > Attachments: SOLR-5865.patch > > > Today, the SolrCloud tests are based on the LuceneTestCase class hierarchy, > which has a couple of issues around support for downstream projects: > - It's difficult to test SolrCloud support in a downstream project that may > have its own test framework. For example, some projects have support for > different storage backends (e.g. Solr/ElasticSearch/HBase) and want tests > against each of the different backends. This is difficult to do cleanly, > because the Solr tests require derivation from LuceneTestCase, while the > other don't > - The LuceneTestCase class hierarchy is really designed for internal solr > tests (e.g. it randomizes a lot of parameters to get test coverage, but a > downstream project probably doesn't care about that). It's also quite > complicated and dense, much more so than a downstream project would want. > Given these reasons, it would be nice to provide a simple > "MiniSolrCloudCluster", similar to how HDFS provides a MiniHdfsCluster or > HBase provides a MiniHBaseCluster. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org