Never mind... the problem was that I compiled my jar against Lucene 3.3, but tried running against Lucene 4.4. It works when I also run against 3.3. (Or, at least, I get test failures that make sense!)
Scott > -----Original Message----- > From: Scott Schneider [mailto:scott_schnei...@symantec.com] > Sent: Tuesday, December 17, 2013 5:28 PM > To: java-user@lucene.apache.org > Subject: Running Lucene tests on a custom Directory subclass > > Hello, > > I'm trying to run Lucene's unit tests on Lucene Transform's > TransformedDirectory. I get an AbstractMethodError on createOutput(), > but I'm quite sure that method is defined. Here are a few lines from > the error: > > test: > ... > [junit4] Suite: org.apache.lucene.index.TestStressAdvance > [junit4] 2> NOTE: reproduce with: ant test - > Dtestcase=TestStressAdvance -Dtests.method=testStressAdvance - > Dtests.seed=7285A7FB616F8E90 -Dtests.slow=true - > Dtests.directory=org.apache.lucene.store.transform.TransformedDirectory > LuceneTestWrapper -Dtests.locale=sr_BA -Dtests.timezone=Eire - > Dtests.file.encoding=US-ASCII > [junit4] ERROR 0.44s J3 | TestStressAdvance.testStressAdvance <<< > [junit4] > Throwable #1: java.lang.AbstractMethodError: > org.apache.lucene.store.Directory.createOutput(Ljava/lang/String;Lorg/a > pache/lucene/store/IOContext;)Lorg/apache/lucene/store/IndexOutput; > [junit4] > at > __randomizedtesting.SeedInfo.seed([7285A7FB616F8E90:E105EDB90E7666C2]:0 > ) > [junit4] > at > org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectory > Wrapper.java:495) > [junit4] > at > org.apache.lucene.store.TrackingDirectoryWrapper.createOutput(TrackingD > irectoryWrapper.java:62) > ... > [junit4] > at > org.apache.lucene.index.TestStressAdvance.testStressAdvance(TestStressA > dvance.java:56) > [junit4] > at java.lang.Thread.run(Thread.java:722) > [junit4] 2> NOTE: test params are: codec=Lucene40, > sim=DefaultSimilarity, locale=sr_BA, timezone=Eire > [junit4] 2> NOTE: Windows 7 6.1 x86/Oracle Corporation 1.7.0_03 > (32-bit)/cpus=8,threads=1,free=5157752,total=16252928 > [junit4] 2> NOTE: All tests run in this JVM: [TestMathUtil, > TestStressAdvance] > [junit4] Completed on J3 in 0.47s, 1 test, 1 error <<< FAILURES! > > To run the tests, I use "ant test - > Dtests.directory=org.blahblah.TransformedDirectoryLuceneTestWrapper - > lib blahblah". I created the TransformedDirectoryLuceneTestWrapper > class (as a subclass of TransformedDirectory) and gave it a 0-argument > constructor. > > > Apologies if this was addressed elsewhere. In googling for an answer, > the term "Directory" is basically invisible. I found a page on running > Lucene's tests on a custom codec and approximated those steps. > > Scott --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org