On 3/26/2015 6:40 AM, Mrinali Agarwal wrote: > I am trying to run my test cases in solr using ant . > I am using below command > > ant test –Dtestcase=TestXXXX -Dtests.leaveTemporary=true > > Now , here i have my own custom schema & solrConfig . On running the above > command on solr directiory , it builds the project again which overrides my > schema.xml & solrConfig.xml > > Due to this my test case fails because it is not able to find customized > schema & config . > > Let me know any suggestions
Take a look at org.apache.solr.search.TestLFUCache for an example of a test that loads a custom solrconfig. The custom config is here: solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml The code in TestLFUCache.java that uses that config is: @BeforeClass public static void beforeClass() throws Exception { initCore("solrconfig-caching.xml", "schema.xml"); } Thanks, Shawn