You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Koorosh Vakhshoori <kv...@gmail.com> on 2012/07/18 02:33:29 UTC

Solr 4.0 ALPHA: AbstractSolrTestCase depending on LuceneTestCase

Hi,
  I have been developing extensions to SOLR code using 4.0 truck. For JUnit
testing I am extending AbstractSolrTestCase which in the ALPHA release is
located in JAR apache-solr-test-framework-4.0.0-ALPHA.jar. However, this
class extends LuceneTestCase which comes from JAR
lucene-test-framework-4.0-SNAPSHOT.jar. In the ALPHA release the later JAR
is not shipped or I can't find it. My question is which class should I use
for testing customized/extensions to SOLR/LUCENE code? Is there a better way
of doing this without build the lucene-test-framework-4.0-SNAPSHOT.jar from
the source code?

Thanks,

Koorosh


--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-0-ALPHA-AbstractSolrTestCase-depending-on-LuceneTestCase-tp3995639.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr 4.0 ALPHA: AbstractSolrTestCase depending on LuceneTestCase

Posted by Chris Hostetter <ho...@fucit.org>.
:   I have been developing extensions to SOLR code using 4.0 truck. For JUnit
: testing I am extending AbstractSolrTestCase which in the ALPHA release is
: located in JAR apache-solr-test-framework-4.0.0-ALPHA.jar. However, this
: class extends LuceneTestCase which comes from JAR
: lucene-test-framework-4.0-SNAPSHOT.jar. In the ALPHA release the later JAR
: is not shipped or I can't find it. My question is which class should I use

Koorosh: thank you for asking about this.  I believe there is definitel ya 
packaging bug here...

https://issues.apache.org/jira/browse/SOLR-3690

: for testing customized/extensions to SOLR/LUCENE code? Is there a better way
: of doing this without build the lucene-test-framework-4.0-SNAPSHOT.jar from
: the source code?

I would suggest you continue to use the apache-solr-test-framework.*.jar 
-- but for now you'll have to use the souce release in order to compile 
the lucene-test-framework.*.jar.

I would however suggest that you consider using SolrTestCaseJ4 as your 
base class instead of AbstractSolrTestCase -- the key distinction being 
that it doesn't re-create a completley new SolrCore for every test method, 
which isn't typically needed for most test code, and allows it to be much 
faster.



-Hoss