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 zhu kane <ka...@gmail.com> on 2013/04/15 13:28:26 UTC

Test harness can not load existing index data in Solr 4.2

I'm extending Solr's *AbstractSolrTestCase* for unit testing.

I have existing 'schema.xml', 'solrconfig.xml' and index data. I want to
start an embedded solr server to load existing collection and its data.
Then test searching doc in solr.

This way works well in Solr 3.6. However it does not work any more after
adapting to Solr 4.2.1. After some investigating, I found it looks like the
index data is not loaded by SolrCore created by Test harness.

This also can be reproduced when using index of example doc of Solr, I
posted the detail test class in my stackoverflow question[1].

Is it a bug of test harness? Or is there better way to load existing index
data in unit test?

Thanks.
[1]
http://stackoverflow.com/questions/15947116/solr-4-2-test-harness-can-not-load-existing-index-data

Mengxin Zhu

Re: Test harness can not load existing index data in Solr 4.2

Posted by zhu kane <ka...@gmail.com>.
I think the problem should be EmbeddedSolrServer can't load existing index
data.

Any committer can help confirm whether it's a bug or not.

Thank you.


Kane


On Mon, Apr 15, 2013 at 7:28 PM, zhu kane <ka...@gmail.com> wrote:

>  I'm extending Solr's *AbstractSolrTestCase* for unit testing.
>
> I have existing 'schema.xml', 'solrconfig.xml' and index data. I want to
> start an embedded solr server to load existing collection and its data.
> Then test searching doc in solr.
>
> This way works well in Solr 3.6. However it does not work any more after
> adapting to Solr 4.2.1. After some investigating, I found it looks like the
> index data is not loaded by SolrCore created by Test harness.
>
> This also can be reproduced when using index of example doc of Solr, I
> posted the detail test class in my stackoverflow question[1].
>
> Is it a bug of test harness? Or is there better way to load existing index
> data in unit test?
>
> Thanks.
> [1]
> http://stackoverflow.com/questions/15947116/solr-4-2-test-harness-can-not-load-existing-index-data
>
> Mengxin Zhu
>