[jira] Issue Comment Edited: (LUCENE-2037) Allow Junit4 tests in our environment.

2010-02-27 Thread Uwe Schindler (JIRA)

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

Uwe Schindler edited comment on LUCENE-2037 at 2/27/10 8:16 AM:


Erick,

thats already fixed in trunk with my last commit, as you noticed! It exactly 
does what also rules.TestName does :-) -- I found this class later too and 
realized that it does the same -- only that lucene has the method in the base 
class for better migration experience :-).

Yesterday I also wrote an extra test assertion, that verifies, that the ported 
test class has all methods starting with "test" annotated with @Test. Robert 
and me wants to maybe apply this patch during the migration phase when 
developers are not yet using Junit4 so long and forget to add @Test. The path 
is very rough and maybe optimized (if @BeforeClass could be used, but cannot as 
static).

The string-ctors are not used in lucene, as the testName in Lucene should be 
automatically from the current method. The additional ctors in Lucene's tests 
were only very very very old junit3 relicts (later versions of junit3 also do 
not need it anymore, they set the test name after instantiating).

  was (Author: thetaphi):
Erick,

thats already fixed in trunk with my last commit, as you noticed! It exactly 
does what also rules.TestName does :-) -- I found this class later too and 
realized that it does the same -- only that lucene has the method in the base 
class for better migration experience :-).

Yesterday I also wrote an extra test assertion, that verifies, that the prorted 
testcase has all methods starting with "test" assigned a @Test. Robert and me 
wants to maybe apply this patch during the migration phase when developers are 
not yet using Junit4 so long and forget to add @Test. The path is very rough 
and maybe optimized (if @BeforeClass could be used, but cannot as static).

The string-ctors are not used in lucene, as the testName in Lucene should be 
automatically from the current method. The additional ctors in Lucene's tests 
were only very very very old junit3 relicts (later versions of junit3 also do 
not need it anymore, they set the test name after instantiating).
  
> 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



Re: [jira] Issue Comment Edited: (LUCENE-2037) Allow Junit4 tests in our environment.

2009-11-15 Thread Erick Erickson
That thought occurred to me earlier, but I don't know enough specifics yet.
I intend
to find out though

Erick


On Sun, Nov 15, 2009 at 8:46 AM, Robert Muir (JIRA)  wrote:

>
>[
> https://issues.apache.org/jira/browse/LUCENE-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778101#action_12778101]
>
> Robert Muir edited comment on LUCENE-2037 at 11/15/09 1:45 PM:
> ---
>
> Is there some way to use Junit4 parameterized tests to do this
> LocalizedTestCase-type thing, so we don't have to override runBare()?
>
>
>  was (Author: rcmuir):
>Is there some way to use Junit4 parameterized tests to do this
> LocalizedTestCase-type thing, so we don't have to override runBase()?
>
>
> > 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
>
>


[jira] Issue Comment Edited: (LUCENE-2037) Allow Junit4 tests in our environment.

2009-11-15 Thread Robert Muir (JIRA)

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

Robert Muir edited comment on LUCENE-2037 at 11/15/09 1:45 PM:
---

Is there some way to use Junit4 parameterized tests to do this 
LocalizedTestCase-type thing, so we don't have to override runBare()?


  was (Author: rcmuir):
Is there some way to use Junit4 parameterized tests to do this 
LocalizedTestCase-type thing, so we don't have to override runBase()?

  
> 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