[
https://issues.apache.org/jira/browse/SOLR-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942330#comment-13942330
]
Gregory Chanan commented on SOLR-5865:
--------------------------------------
Hmm, at this point may make more sense to not try to get the test to work
outside of the test hierarchy completely. We could try to recreate the minimum
set of what we need there (SystemPropertiesRestoreRules and ThreadLeakScopes)
but that may change in the test hierarchy itself, requiring just this test to
update. The important thing, I think, is that we don't require the complete
SolrCloud test hierarchy, e.g. AbstractFullDistribZkTestBase and the like.
The question then, is whether we rely on LuceneTestCase or SolrTestCaseJ4.
LuceneTestCase is arguably better, because we know we don't rely on anything
solr-specific for the test, although the downside is we may have to update it
to keep in sync with the SolrTestCaseJ4. I don't have a strong preference
either way.
I messed around with that a little bit and I have a patch that seems to work
with just LuceneTestCase -- I had to import the a couple of rules from
SolrTestCaseJ4, but not much. I haven't run the full suite though, so I'm not
100% sure it's kosher.
> 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
> Assignee: Mark Miller
> Attachments: SOLR-5865.patch, SOLR-5865.patch, SOLR-5865addendum.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: [email protected]
For additional commands, e-mail: [email protected]