There is no way for the runner to tell which class is a JUnit test class. Typically this is done with pattern matching on file names. common-build.xml converts this property to an file inclusion pattern (see tests.explicitclass) and if you include everything, the runner tries to load and inspect a class it knows nothing about... in fact I don't know why it's doing it because the runner itself has a "class name filter" it applies to classes before it initializes them -- the tests.class property should be passed directly to <junit4> task (instead, an empty string is passed there). Perhaps this was done to minimize the number of scanned/ loaded files, but it's not the best idea.
Dawid On Wed, Oct 24, 2018 at 2:39 AM Varun Thacker <[email protected]> wrote: > > I wanted to run all tests within one package so I ran it like this > > ant clean test "-Dtests.class=org.apache.solr.search.facet.*" > > The test run fails because the harness is trying to run DebugAgg as it's a > public class while it's not really a test class. > > [junit4] Tests with failures [seed: EB7B560286FA14D0]: > [junit4] - org.apache.solr.search.facet.DebugAgg.initializationError > [junit4] - org.apache.solr.search.facet.DebugAgg.initializationError > > > Is there a way to avoid this? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
