On May 1, 2005, at 10:20 PM, Wolfgang Hoschek wrote:
I've uploaded code that now runs against the current SVN, plus junit test cases, plus some minor internal updates to the functionality itself. For details see http://issues.apache.org/bugzilla/show_bug.cgi?id=34585
Be prepared for the testcases to take some minutes to complete - don't hit CTRL-C :-)
Erik, if nobody objects, can you please put this into a contrib area, e.g. module "memory" in org.apache.lucene.index.memory, or similar?
I have committed it into contrib/memory. I made a few minor tweaks such as 2005 for year in license header, putting package statement above license, and adjusting the paths in the test case to match our standard src/test and src/java structure.
The test case is failing (type "ant test" at the contrib/memory working directory) with this:
[junit] Testcase: testMany(org.apache.lucene.index.memory.MemoryIndexTest): Caused an ERROR
[junit] BUG DETECTED:69 at query=term AND NOT phrase term, file=src/java/org/apache/lucene/index/memory/MemoryIndex.java, [EMAIL PROTECTED]
[junit] java.lang.IllegalStateException: BUG DETECTED:69 at query=term AND NOT phrase term, file=src/java/org/apache/lucene/index/memory/MemoryIndex.java, [EMAIL PROTECTED]
[junit] at org.apache.lucene.index.memory.MemoryIndexTest.run(MemoryIndexTest.java: 305)
[junit] at org.apache.lucene.index.memory.MemoryIndexTest.testMany(MemoryIndexTest. java:228)
Your conversion to a JUnit test case was not quite what I had in mind :) You simply wrapped your main() into a testMany method. But it is fine for now as it is easily converted into more granular testXXX methods that use the JUnit assert* methods. The paths to test files will likely need to be parameterized and passed in from Ant's <junit> task via system properties in order to run correctly regardless of working directory. These things are easily tweaked though and not worth holding back the initial commit.
Again, I'm impressed with your level of javadocs and thoroughness in the code. Good stuff!
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]