> Is this (the "globbing") really an important feature?  Is it somehow
> necessary in the implementation for other reasons?

There are a few reasons for that:

- without globbing you'd have to provide a fully qualified class name
(and test name);
- Lucene doesn't use it but if we did have one test-covers-all type of
execution then you could run all of a given module's tests by giving
its package prefix,
- remember that the test case "names" are not necessarily the method
name -- when repeat annotation (or sysprop) is used each test method
expands into multiple tests (the name then includes the seed and
repetition number if that's not enough to distinguish individual test
cases). These things stem from JUnit limitations. And globbing is a
simple way to run all test cases expanded from a single method.

I personally do use globbing to restrict to a package (when I wish to
test a single module), so it's not a dead feature :)

> Another (third) trap I've hit is trying to run a single method, but
> accidentally running two because the first method is a prefix of the
> second one ... when this happens, I go and rename the methods so there
> is no prefix anymore.

This is because in Lucene's ANT code there are backcompat settings
that expand testcase/testmethod into any substring match. If you used
tests.method and tests.class you could specify these accurately.

Dawid

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

Reply via email to