lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <dmit...@earthlink.net>
Subject How do we pass arguments to JUnit test cases?
Date Fri, 19 Sep 2003 20:21:02 GMT
I'm trying to setup a JUnit test case that needs a file path in order to 
create an FSDirectory. (RAMDirectory is ok for some things, but I'd like 
to verify that the files are written correctly and can be read on 
subsequent runs of the program). Does Lucene have any standard policy 
for doing this in test cases? For example, I've seen people passing 
these kinds of things as System.properties. It can also be done relative 
to a working dir. Are there any test cases that already do this?

Also, are there test cases that have pre-built datasets that they start 
with. For example, a test case that verifies backward compatibility 
could start by reading an index directory created by a previous version. 
One solution I've seen to this is to have a set of zip files checked 
into CVS that contain various test data sets. A test case then starts 
off by expanding one of these into some pre-determined directory and 
proceeds from there. Has anything like this been done before for Lucene?

Thanks.
Dmitry.



Mime
View raw message