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

Reply via email to