You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2011/08/11 17:02:13 UTC

Re: [compress] How to deal with long running test? Maven Profile?

On 11 August 2011 15:44, Stefan Bodewig <bo...@apache.org> wrote:
> Hi,
>
> currently I've set the Zip64SupportTest to @Ignore because - even if you
> dont have the integration test archives around - it simply takes too
> long to run every time.
>
> Using the pretty decent notebook $work has given to me the whole test
> takes 45 minutes of heavy I/O load and the machine is more or less
> unusable during that time.
>
> But then again I surely want to run the tests every now and then and
> adding/removing the @Ignore is cumbersome so I thought a profile was the
> correct approach.
>
> <disclaimer>
> No, I'm not a mvn expert, have never been, will never be.  I don't use
> mvn for anything but Compress and RAT and most things I know I have
> learnt by fighting against mvn in Gump - and this is more than I ever
> wanted to learn 8-)
> </disclaimer>
>
> My first attempt was to naively exclude the test in the "normal" plugins
> section inside the POM and add a profile that defines the surefire
> plugin without the excludes.  Excluding works fine but even if I
> activate the profile the test remains excluded (I guess I can't undo a
> configuration via a profile).
>
> I suspect I'm taking an approach that is completly wrong to begin with
> and that many of you around here know exactly what needs to be done.
>
> Please enlighten me.

Not tried this, but looks to be what you want:

http://stackoverflow.com/questions/1689242/conditionally-ignoring-tests-in-junit-4

> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [compress] How to deal with long running test? Maven Profile?

Posted by sebb <se...@gmail.com>.
On 11 August 2011 16:32, Stefan Bodewig <bo...@apache.org> wrote:
> On 2011-08-11, sebb wrote:
>
>> Not tried this, but looks to be what you want:
>
>> http://stackoverflow.com/questions/1689242/conditionally-ignoring-tests-in-junit-4
>
> I know Assume, even use it inside the test to skip all tests that
> require the interop archives when those files are not present.
>
> For this to work I'd need to have a way to know the mvn profile was
> active while running the JUnit test.  Hmm, a system property could work.

Yes, sorry, realised after posting that I'd left that bit out...

> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [compress] How to deal with long running test? Maven Profile?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-08-11, sebb wrote:

> Not tried this, but looks to be what you want:

> http://stackoverflow.com/questions/1689242/conditionally-ignoring-tests-in-junit-4

I know Assume, even use it inside the test to skip all tests that
require the interop archives when those files are not present.

For this to work I'd need to have a way to know the mvn profile was
active while running the JUnit test.  Hmm, a system property could work.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org