[ 
https://issues.apache.org/jira/browse/LUCENE-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839126#action_12839126
 ] 

Erick Erickson commented on LUCENE-2037:
----------------------------------------

Uwe:

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...
  }

  @Rule
  public final TestName name = new TestName();

See:
http://kentbeck.github.com/junit/javadoc/4.7/org/junit/rules/TestName.html Note 
that this site is better than anything I could find at junit.org....

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....

Erick


> Allow Junit4 tests in our environment.
> --------------------------------------
>
>                 Key: LUCENE-2037
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2037
>             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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to