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

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

Frankly, I don't see how that would work without getting into the guts of
the @RunWith(value = Parameterized.class) Junit4 annotation. As I understand
it, that annotation *on the class* causes the framework to make a call to
the static method that provides a list of parameters (annotated with
@Parameters). The framework then takes the returned list and, *for each
element in the list* calls a constructor with that element and runs all the
tests in the class.

So annotating a test with @AllLocales would somehow have to get in there and
change what the framework does. No doubt it's do-able, but until I see more
than 10 seconds difference in running the tests I'm not sure it's worth it.
Nor would I advocate altering the behavior of the framework for back-compat,
I'd far rather refactor the tests into those that run for all locales and
those that don't.

I suppose one could to the inverse, that is create an annotation
@DefaultLocaleOnly that aborts early if the locale isn't the default, but
again I think the first approach I'd advocate would be to work within the
framework until it was too painful....

FWIW
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: Erick Erickson
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: junit-4.7.jar, LUCENE-2037.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