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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
