openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: [DISCUSS] refactor @AllowFailure
Date Mon, 06 Apr 2009 22:30:28 GMT
Hi Pinaki,

Maybe I should have said the @AllowFailure annotation ignores the results of
a test, not the test itself. I'm not sure why that would be better than just
excluding the test altogether though.

Having testcases that might work (@AllowFailure) undermines the purpose of
the test suite. The function under test may start working at any time and
then stop working at any time, all the while we're blissfully unaware of
what we've done.

To put it bluntly if we don't care enough to fail the build, why do we care
enough to run the test?

Regarding homegrown solutions I see your point. In the case of a de facto
standard like jUnit, I'd prefer to use their homegrown solution over ours in
order to be more encouraging to new developers. That and we don't have to
maintain the code ;-)

-mike

On Mon, Apr 6, 2009 at 12:15 PM, Pinaki Poddar <ppoddar@apache.org> wrote:

>
> The purpose of AllowFailure is *not* to ignore a test from running. But to
> run the test and allow our test harness to continue even if the annotated
> test fails. If a JUnit4 annotation provides us such functionality, perhaps
> we can replace it. But remember that any solution is homegrown -- it is just
> a different home than your own:)
>
>
> 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
>
>
>
>
> -----
> Pinaki Poddar                      http://ppoddar.blogspot.com/
>
> http://www.linkedin.com/in/pinakipoddar
> OpenJPA PMC Member/Committer
> JPA Expert Group Member
> --
> View this message in context:
> http://n2.nabble.com/-DISCUSS--refactor-%40AllowFailure-tp2593705p2594325.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

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