When I try to run a Solr test case from Eclipse (Right-Click > Run As > JUnit Test), I get the following printed to the Eclipse console:
Feb 27, 2012 5:21:06 PM org.apache.solr.SolrTestCaseJ4 deleteCore
INFO: ###deleteCore
The whole process runs and exits very quickly without running the actual test case.
I have tried to set my working directory according to the instructions at http://wiki.apache.org/solr/TestingSolr to no avail. Those instructions refer to a directory that doesn’t actually exist any more (src/test/test-files), so I tried setting it to solr/core/src/test-files without any luck. I’m using the latest SOLR trunk (as of Feb 27,2012)
What am I missing?
From your own answer looks like you’re adding to the classpath a jar which contains the code which should already be in your workspace, thus in your classpath.
The Solr build file has a really handy eclipse target which generates the eclipse project, so you can import it in one click. Just run
ant eclipsefrom the root directory and you shouldn’t have problems with classpath.