You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jieryn <ji...@gmail.com> on 2013/09/05 18:28:26 UTC

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

Greetings,

On Fri, Aug 23, 2013 at 3:16 AM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> btw removing selenium your test passes for me

Getting back into this.. I see that I had allowed surefire to ignore
test failures. When I remove that maven plugin setting, the build
fails.

https://github.com/jieryn/javaee-example
https://travis-ci.org/jieryn/javaee-example

It seems that transactions are not rolled back for each @Test. I am
coming from a SpringFramework test environment where each @Test had
transaction isolation, so that one test wouldn't interfere with
others. How can I get this behavior, I would have thought it to be the
default..

Thanks!

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

Posted by jieryn <ji...@gmail.com>.
Greetings,

On Fri, Sep 6, 2013 at 9:39 AM, jieryn <ji...@gmail.com> wrote:
> On Thu, Sep 5, 2013 at 5:28 PM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
>> no, you need to specify it using arquillian @Transactional(ROLLBACK) either
>> on the class or methods.
>> Note: it only works in server side tests, not in client side ones
>
> Even after the @Transactional(ROLLBACK) addition, this still fails:
> https://travis-ci.org/jieryn/javaee-example/builds/11058408

This appears to be a bug with Arquillian, it is logged here:
https://issues.jboss.org/browse/ARQ-1473

Removing @Before and @After allows all tests to pass. Thanks!!

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

Posted by jieryn <ji...@gmail.com>.
Greetings,

On Thu, Sep 5, 2013 at 5:28 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> no, you need to specify it using arquillian @Transactional(ROLLBACK) either
> on the class or methods.
>
> Note: it only works in server side tests, not in client side ones

Even after the @Transactional(ROLLBACK) addition, this still fails:

https://travis-ci.org/jieryn/javaee-example/builds/11058408

Re: tomee 1.6.0-SNAPSHOT, ejb example failing to inject @persistencecontext

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

no, you need to specify it using arquillian @Transactional(ROLLBACK) either
on the class or methods.

Note: it only works in server side tests, not in client side ones

*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*



2013/9/5 jieryn <ji...@gmail.com>

> Greetings,
>
> On Fri, Aug 23, 2013 at 3:16 AM, Romain Manni-Bucau
> <rm...@gmail.com> wrote:
> > btw removing selenium your test passes for me
>
> Getting back into this.. I see that I had allowed surefire to ignore
> test failures. When I remove that maven plugin setting, the build
> fails.
>
> https://github.com/jieryn/javaee-example
> https://travis-ci.org/jieryn/javaee-example
>
> It seems that transactions are not rolled back for each @Test. I am
> coming from a SpringFramework test environment where each @Test had
> transaction isolation, so that one test wouldn't interfere with
> others. How can I get this behavior, I would have thought it to be the
> default..
>
> Thanks!
>