Hi Jakub, Actually, I'm surprised that the test control module *doesn't* complain about that (it may be a difference between how Weld SE and Weld Servlet each do bootstrapping). The error is 100% accurate, you shouldn't put the interceptor in your local beans.xml since it's in the plugin's (though that may be something different between CDI 1.0 and 1.1). It's a general problem I've noticed whenever someone is using an embedded container but doesn't run their real deployment in an embedded container (I doubt you're running your test or prod tomcat in embedded mode; though please do let me know otherwise).
On Sun, Mar 2, 2014 at 9:58 AM, Jakub Ječmínek <[email protected]> wrote: > Hello John, > I could have expect this question from author of Arquillian testing guide(I > am curently reading it) :) I have absolutely no problem with arquillian and > I actually like it. But when I tried to implement it for this project > I experienced lot of problems. The project is targeted for Tomcat 7 and is > using latest Weld-servlet 2.1.2.Final, Eclipselink 2.5.1 and Deltaspike > modules(mainly core and JPA version 0.5) with JSF 2.2 + Primefaces. > The deltaspike JPA module is used for managing transactions using > TransactionalInterceptor. I tried to set up arquillian tests, using tomcat > embeded module. I packaged all dependencies with packages from application > that were part of test using ShrinkWrap but I've got exception: > WELD-001416 Enabled interceptor class > [<class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class> > in > jar:file:/D:/dev/experiments/arquillian-container-tomcat/tomcat-embedded-7/target/tomcat-embedded-7/webapps/ROOT/WEB-INF/lib/deltaspike-jpa-module-impl-0.5.jar!/META-INF/beans.xml@24, > <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class> > in > jar:file:/D:/dev/mavenrepository/org/apache/deltaspike/modules/deltaspike-jpa-module-impl/0.5/deltaspike-jpa-module-impl-0.5.jar!/META-INF/beans.xml@24, > <class>org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor</class> > in > file:/D:/dev/experiments/arquillian-container-tomcat/tomcat-embedded-7/target/test-classes/META-INF/beans.xml@10] > specified twice > > I've used arquillian example as a starting point > https://github.com/arquillian/arquillian-container-tomcat/blob/master/tomcat-embedded-7 > > I also tried to use glassfish-embeded module but I've got similar result. > With Test-Control CDI module(I've used 0.6 snapshot) I was capable to > quickly set up test suite. > It is also very similar to SpringJUnit4ClassRunner which I have know quite > well(I have mostly spring development background). > > Lately I also read this article > http://struberg.wordpress.com/2012/03/27/unit-testing-strategies-for-cdi-based-projects/where > is used similar approach for testing CDI applications over > arquillian. > > > 2014-03-02 15:02 GMT+01:00 John D. Ament <[email protected]>: > >> Jakub, >> >> I'm curious, how is the test control more suited for integration >> testing over arquillian? >> >> - John >> >> On Sun, Mar 2, 2014 at 8:33 AM, Jakub Ječmínek <[email protected]> wrote: >> > Hi all, >> > I would like to ask when 0.6 will be released and also if test-control >> > module will be part of this release. We would like to use this module for >> > integration testing in one of our project as it is seems to be more >> suited >> > for our needs than arquillian. >> > As I understand from this discussion >> > >> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/DISCUSS-next-release-version-0-6-or-1-0-td4655970i40.htmlthe >> > 0.6 release should happen very soon, right? >> > >> > With best regards, >> > Jakub Ječmínek >>
