Hi Mark, in openejb we decided (maybe i should say I ;)) to use the classpath for such things. Kind of "test my app as it is". That's a good compromise between adapter complexity and real need (IMO arquillian should provide the next proposal)
If it doesn't match cases you want to manage just write a custom classloader managing the SW archive and ignoring AppClassLoader. Another solution (a bit weirder ;)) is to start a new JVM with a waiting container and to send it the SW archive info (i don't like so much this solution for embedded containers). *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2012/9/30 Mark Struberg <[email protected]> > gnnnn, damn mailer daemon rejects me as spam lately :/ > > > remailing... > > > ----- Forwarded Message ----- > > From: Mark Struberg <[email protected]> > > To: deltaspike <[email protected]> > > Cc: Aslak Knutsen <[email protected]> > > Sent: Sunday, September 30, 2012 9:29 PM > > Subject: CDI Extension testing with Arquillian > > > > Hi folks! > > > > I have a small problem with testing the AbstractContext with Arquillian. > > I wrote a DummyContext + DummyContextExtension and add them to my > deployment > > (see the last commit) but fail to test it. > > > > It seems that neither the Weld Arquillian container not OWB (didn't test > > others) take the Extensions from the ShrinkWrap archive but from the > available > > ClassPath. > > > > The registered Extension in > > > > return ShrinkWrap > > .create(WebArchive.class, "abstractContextTest.war") > > .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) > > .addAsLibraries(testJar) > > .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") > > .addAsServiceProvider(Extension.class, > > DummyScopeExtension.class); > > > > just has no effect at all. > > > > How to deal with that? > > > > The easy solution would be to just add the Extension to the test > classpath via a > > META-INF/services/... file. > > For now this seems the best we can do, but imo that's no clean final > > solution, wdyt? > > > > LieGrue, > > strub > > >
