lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <>
Subject [jira] Commented: (LUCENE-2037) Allow Junit4 tests in our environment.
Date Sat, 27 Feb 2010 02:00:06 GMT


Erick Erickson commented on LUCENE-2037:


You were asking about getName in LuceneTestCaseJ4. It appears that you've taken care of this,
is there still anything to do? There's no longer a c'tor that takes the test name.

But I did some poking around and came up with the following from "someplace on the web". 

The only two place I could find that used getName were TestFieldScoreQuery and TestOrdValues.
This bit of code works if you put it in these classes.

 private String testName() {
    return getClass().getName()+"."+ name.getMethodName(); // was getName() from LuceneTestCaseJ4...

  public final TestName name = new TestName();

See: Note that this
site is better than anything I could find at

Once  I found that, I thought "gee, if I put that in the base class, it would be available
to everyone". Which is exactly what you made LuceneTestCaseJ4.getName() do <G>. But
at least I found Kent Beck's version of the docs, which is a plus...

So I guess there's nothing to do as far as getName is concerned.... If there is, let me know....


> Allow Junit4 tests in our environment.
> --------------------------------------
>                 Key: LUCENE-2037
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 3.1
>         Environment: Development
>            Reporter: Erick Erickson
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1
>         Attachments: junit-4.7.jar, LUCENE-2037-getName.patch, LUCENE-2037.patch, LUCENE-2037.patch,
LUCENE-2037.patch, LUCENE-2037_remove_testwatchman.patch, LUCENE-2037_revised_2.patch
>   Original Estimate: 8h
>  Remaining Estimate: 8h
> Now that we're dropping Java 1.4 compatibility for 3.0, we can incorporate Junit4 in
testing. Junit3 and junit4 tests can coexist, so no tests should have to be rewritten. We
should start this for the 3.1 release so we can get a clean 3.0 out smoothly.
> It's probably worthwhile to convert a small set of tests as an exemplar.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message