You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Connolly <st...@gmail.com> on 2010/03/03 12:33:29 UTC

Re: [maven-failsafe-plugin] Failsafe+Jetty integration test trigger surefire twice

The jetty plugin forks a lifecycle to generate the exploded web
application... perhaps you need top perster the jetty maven plugin
developers to give you a goal for running exploded without forking a
lifecycle

On 3 March 2010 11:29, nodje <no...@gmail.com> wrote:

>
> I've been using the standard configuration described in
> http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html to be
> able
> to execute integration tests.
> That is, jetty:run-exploded goal is link to pre-integration-test phase in
> order to have a container to run integration test against.
>
> It works well so far, but I'm noticing only now that the surefire:test
> phase
> is triggered twice during the verify goal execution. This is largely
> lengthening the process.
>
> AFAIU it really is the binding of the jetty:run-exploded goal to the
> pre-integration-phase that is creating this situation: the whole Maven
> lifecycle seems to be re-executed.
> If not bound, everything execute as expected, but integration tests fail of
> course, since there's no container to run against.
>
> Can someone with experience in configuring integration test share
> experience
> here?
>
> I do not understand why binding jetty goal to pre-integration-test phase
> makes it restart the whole lifecycke.
>
> Any resources helping to understand what's exactly going on when binding
> plugin goals to lifecycle phases welcome!
>
> cheers
>
> --
> View this message in context:
> http://n2.nabble.com/maven-failsafe-plugin-Failsafe-Jetty-integration-test-trigger-surefire-twice-tp4666895p4666895.html
> Sent from the maven users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [maven-failsafe-plugin] Failsafe+Jetty integration test trigger surefire twice

Posted by nodje <no...@gmail.com>.
Hi Stephen,

I like your second post ;) 
One the other hand it probably means that you already know that pestering
jetty plugin people won't help!

still, it's frustrating to see some phase triggered more than what is
needed.

I guess i have better things to do than trying to perfect something already
working....

cheers

-- 
View this message in context: http://n2.nabble.com/maven-failsafe-plugin-Failsafe-Jetty-integration-test-trigger-surefire-twice-tp4666895p4672838.html
Sent from the maven users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-failsafe-plugin] Failsafe+Jetty integration test trigger surefire twice

Posted by Stephen Connolly <st...@gmail.com>.
In any case, running your unit tests (which should be fast) multiple times
just makes sure that they really pass ;-)

[and with my serious hat on, will be twice as likely to catch those unstable
bits of code that sporadically cause your unit tests that fail at random]

-Stephen

On 3 March 2010 11:33, Stephen Connolly <st...@gmail.com>wrote:

> The jetty plugin forks a lifecycle to generate the exploded web
> application... perhaps you need top perster the jetty maven plugin
> developers to give you a goal for running exploded without forking a
> lifecycle
>
>
> On 3 March 2010 11:29, nodje <no...@gmail.com> wrote:
>
>>
>> I've been using the standard configuration described in
>> http://maven.apache.org/plugins/maven-failsafe-plugin/usage.html to be
>> able
>> to execute integration tests.
>> That is, jetty:run-exploded goal is link to pre-integration-test phase in
>> order to have a container to run integration test against.
>>
>> It works well so far, but I'm noticing only now that the surefire:test
>> phase
>> is triggered twice during the verify goal execution. This is largely
>> lengthening the process.
>>
>> AFAIU it really is the binding of the jetty:run-exploded goal to the
>> pre-integration-phase that is creating this situation: the whole Maven
>> lifecycle seems to be re-executed.
>> If not bound, everything execute as expected, but integration tests fail
>> of
>> course, since there's no container to run against.
>>
>> Can someone with experience in configuring integration test share
>> experience
>> here?
>>
>> I do not understand why binding jetty goal to pre-integration-test phase
>> makes it restart the whole lifecycke.
>>
>> Any resources helping to understand what's exactly going on when binding
>> plugin goals to lifecycle phases welcome!
>>
>> cheers
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/maven-failsafe-plugin-Failsafe-Jetty-integration-test-trigger-surefire-twice-tp4666895p4666895.html
>> Sent from the maven users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>