lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Castagna <castagna.li...@googlemail.com>
Subject Re: Lucene Eclipse project files (Was: Re: Eclipse project files...)
Date Fri, 16 Apr 2010 12:31:42 GMT
Robert Muir wrote:
> I actually run all the tests from ant... 

Having Ant as the "authoritative" source of information for the build,
tests, packaging is good.

But, being able to quickly run some or all the JUnit tests from
Eclipse and if there are failures double click to point at the
code it's extremely useful.

Do you use Eclipse for development?

> but I see at least these two things:
> 
> 1. you need to turn on assertions when you run junit (-ea), or some 
> IndexWriter tests will not work, as assertions enables debugging code in 
> them.
 >
> 2. the ant scripts set a sysprop tempDir for the tests, but i think 
> there is fallbackcode to use java.io.tmpdir if this is not set. 
> Additionally the benchmark tests use a different sysprop: 
> benchmark.work.dir, which the ant tests also set to the same thing as 
> tempDir. So you might want to try defining several of these with -D for 
> junit.


I am now using these system properties when I run the tests from
Eclipse:

-ea -Dlucene.common.dir=. -DtempDir=/tmp -Dlucene.version=3.1-dev

... and it's much better.

Once the test CollationTestBase becomes abstract, this should be the
last problem:

org.apache.lucene.benchmark.quality.TestQualityRun
testTrecQuality(org.apache.lucene.benchmark.quality.TestQualityRun)
org.apache.lucene.store.NoSuchDirectoryException: directory 
'/opt/workspace/apache-lucene-trunk/test/benchmark/index' does not exist
	at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:211)
	at org.apache.lucene.store.FSDirectory.listAll(FSDirectory.java:234)
	at 
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:582)
	at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:97)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:415)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:234)
	at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:78)
	at 
org.apache.lucene.benchmark.quality.TestQualityRun.testTrecQuality(TestQualityRun.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:276)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


I do not understand who is supposed to create the index directory...
I do not see it in the build.xml :-/


Thanks,
Paolo

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message