I tell IntelliJ IDEA to set the working directory for all the tests to F:\code\solr\src\test\test-files
-Yonik On 6/27/07, Eric Pugh <[EMAIL PROTECTED]> wrote:
Hi all, I always run into path issues when running the unit tests from inside of Eclipse... For example, when I run TestCSVLoader.java I get java.lang.ExceptionInInitializerError at org.apache.solr.util.TestHarness.<init>(TestHarness.java:101) at org.apache.solr.util.AbstractSolrTestCase.setUp (AbstractSolrTestCase.java:102) at org.apache.solr.handler.TestCSVLoader.setUp(TestCSVLoader.java:43) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run (JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run (TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:196) Caused by: java.lang.RuntimeException: Error in solrconfig.xml at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:90) ... 16 more Caused by: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=/Users/eric/ Documents/code/oss/apache/solr/trunk at org.apache.solr.core.Config.openResource(Config.java:357) at org.apache.solr.core.SolrConfig.initConfig(SolrConfig.java:79) at org.apache.solr.core.SolrConfig.<clinit>(SolrConfig.java:87) ... 16 more I have a tweak that gives it an alternate path to look up the file... Would that be of interest to anyone as a patch file? Is there a specific way to config my Eclipse project to find the path? Eric Pugh ------------------------------------------------------- Principal OpenSource Connections Site: http://www.opensourceconnections.com Blog: http://blog.opensourceconnections.com Cell: 1-434-466-1467