You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Carlos Sanchez <ca...@apache.org> on 2007/01/22 23:42:40 UTC

Running integration tests with the embedder

Hi,

I started to take a look on what it takes to run all the it tests with
the embedder besides the current command line approach.

I was thinking in making Validator an interface with two
implementations, command line validator and embedded validator.

Then the desired validator would be injected through plexus in the IT
tests, maybe with a system property.

thoughts?

-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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


Re: Running integration tests with the embedder

Posted by John Casey <ca...@gmail.com>.
I think this could be a useful exercise in determining just how "embeddable"
Maven really is, since it's bound to expose cached instance state and other
similar problems that will carry over from test to test...not just a problem
of garbage collection.

As a way of reviewing Maven itself, it's a very useful idea. As a way of
speeding up tests, again I'd say it's a useful idea. As a way of improving -
or, even maintaining - test consistency an reliability, I just don't think
Maven is there yet...not even the 2.1 side of things, saying nothing about
the 2.0.x side. For example, what effect will this have on the availability
of build extensions from test to test? I'm not certain that's a problem, but
I know there are many little caches that will need to be removed...unless
the embedder dumps the whole container and restarts it each time.

Just my $0.02.

-john

On 1/22/07, Kenney Westerhof <ke...@apache.org> wrote:
>
>
>
> Carlos Sanchez wrote:
> > Hi,
> >
> > I started to take a look on what it takes to run all the it tests with
> > the embedder besides the current command line approach.
> >
> > I was thinking in making Validator an interface with two
> > implementations, command line validator and embedded validator.
> >
> > Then the desired validator would be injected through plexus in the IT
> > tests, maybe with a system property.
> >
> > thoughts?
> >
>
> Sounds good, but I think it'll be only partly useful:
>
> The embedder would require a proper maven dep tree to test,
> which could be problematic....? The embedder is also maven
> version specific.
>
> I've worked on running the it tests in 1 jvm, which is
> almost the same as embedding - I use the M2_HOME,
> load the core/boot/*classworlds*.jar in a new
> rootless classloader, and run the launchers mainWithExitCode.
>
> It's basically a configuration parameter in the verifier,
> 'fork'.
>
> This results in a slight speedup, but after 35 test
> I'm getting permgen space errors, so some classloaders
> (probably container realms) aren't gc'd.
>
> I think for _this_ verifier this mode is also useful as it's
> 100% decoupled from the embedder or any maven version.
>
> When you roll the commit back I'll try to merge in my changes
> again (haven't committed them yet), unless someone objects.
> I atleast think it's useful so we can fix the memleaks in Maven/Plexus.
>
> -- Kenney
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Running integration tests with the embedder

Posted by Kenney Westerhof <ke...@apache.org>.

Carlos Sanchez wrote:
> Hi,
> 
> I started to take a look on what it takes to run all the it tests with
> the embedder besides the current command line approach.
> 
> I was thinking in making Validator an interface with two
> implementations, command line validator and embedded validator.
> 
> Then the desired validator would be injected through plexus in the IT
> tests, maybe with a system property.
> 
> thoughts?
> 

Sounds good, but I think it'll be only partly useful:

The embedder would require a proper maven dep tree to test,
which could be problematic....? The embedder is also maven
version specific.

I've worked on running the it tests in 1 jvm, which is
almost the same as embedding - I use the M2_HOME,
load the core/boot/*classworlds*.jar in a new
rootless classloader, and run the launchers mainWithExitCode.

It's basically a configuration parameter in the verifier,
'fork'.

This results in a slight speedup, but after 35 test
I'm getting permgen space errors, so some classloaders
(probably container realms) aren't gc'd.

I think for _this_ verifier this mode is also useful as it's
100% decoupled from the embedder or any maven version.

When you roll the commit back I'll try to merge in my changes
again (haven't committed them yet), unless someone objects.
I atleast think it's useful so we can fix the memleaks in Maven/Plexus.

-- Kenney

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


Re: Running integration tests with the embedder

Posted by Jason van Zyl <ja...@maven.org>.
On 22 Jan 07, at 2:42 PM 22 Jan 07, Carlos Sanchez wrote:

> Hi,
>
> I started to take a look on what it takes to run all the it tests with
> the embedder besides the current command line approach.
>
> I was thinking in making Validator an interface with two
> implementations, command line validator and embedded validator.
>
> Then the desired validator would be injected through plexus in the IT
> tests, maybe with a system property.
>
> thoughts?
>

A validator should not execute anything. It should validate. We  
already have a handful of verifiers which themselves need to be  
collected so that set of tools has been established.

We also have a set of invokers, 5 of them, and that's where the  
option to invoke via the CLI or the Embedder should take place. The  
invoker should be able to run any version of Maven, pointing at  
various CLI places and the embedder by forking a JVM with the  
embedder assembly.

A new IT tool should combine the two the invoker and the verifier.

jason.



> -- 
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                             -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


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