openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Re: [DISCUSS] refactor @AllowFailure
Date Mon, 06 Apr 2009 16:45:43 GMT
Sorry Donald, I missed that issue.

I'd prefer the jUnit 4 annotation over any homegrown solution. The catch
with jUnit 4 is that (at least in my experience) it quadruples the memory
requirement to run the tests as is. Setting test.jvm.arguments=-Xmx2G
probably isn't viable for most devs (tried with 768M, 1G, and 2G, only the
latter worked for me).

Regarding @Ignore, I think it should replace @AllowFailure instead of adding
two annotations that do nearly the same thing. Will take a closer look
tonight, time permitting.


On Mon, Apr 6, 2009 at 11:23 AM, Donald Woods <> wrote:

> I would rather see us use a Junit v4 annotation like @Ignore as provided
> via OPENJPA-998 (which just needs someone to review and commit it...)
> /**
>  * Signals to the harness to ignore the annotated test.
>  *
>  */
> @Target({TYPE, METHOD})
> @Retention(RUNTIME)f
> public @interface Ignore {r
>    boolean value() default true;
>    String message() default "";
> }
> After the above is added, the @AllowFailure support can be removed and the
> updated to look for @Ignore by default.
> -Donald
> Michael Dick wrote:
>> Hi all,
>> The AllowFailure annotation is very useful in that it allows specific test
>> methods to be ignored during a typical Maven build.
>> The implementation, however is rather confusing as a "clean" build of
>> OpenJPA will typically contain several stack traces from exceptions.
>> Running
>> these optional tests that currently do not pass just consumes CPU cycles
>> that could be better spent elsewhere.
>> I propose refactoring @AllowFailure to be called @OptionalTest (or just
>> @Optional) and updating the supporting methods in PersistenceTestCase so
>> that test methods (or classes) annotated with @OptionalTest are skipped
>> unless a jvm system property is true (ie -Dopenjpa.optional.tests=true).
>> I think this will save everyone's CPU cycles without violating the intent
>> of
>> @AllowFailure. In addition with this change we could resurrect the changes
>> for OPENJPA-770 and we could clean up the root pom.xml a bit.
>> Anyone else have strong opinions about @AllowFailure?
>> -mike

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message