You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jean-Louis Monteiro <jl...@tomitribe.com> on 2020/11/13 08:59:23 UTC

Challenge Transaction (JTA) TCK tests

Hi all,

Been trying to look at JTA support and see if TomEE passes TCKs.
Looks like we are failing on most of the tests in the package

com.sun.ts.tests.jta.ee.transactional.*

After digging into why they were failing I realized, transactions were
leaking into the thread context (ThreadLocal) and therefore if the test was
randomly picking a test that was badly used before, it would fail on
UserTransaction.begin because nested transactions aren't allowed.

After digging into TomEE and Geronimo Transaction I realized i was probably
the TCK test which was not too good.

Here is where it fails.
https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jta/ee/transactional/Client.java#L420

I see only begin() but no rollback/commit in some methods which means that
some transactions may leak.

What do you think?
I will open a challenge against the TCK if we are all on the same page with
the analysis

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

Re: Challenge Transaction (JTA) TCK tests

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Thanks David for the response.

The transactions tests failing are actually new because they are related
to @Transaction support by CDI.
I double checked and no there is no clean up performed. So again, if you
are lucky and you never get a thread already used before, then you are
good. Otherwise, you get random failures.

I opened https://github.com/eclipse-ee4j/jakartaee-tck/issues/573



Le ven. 13 nov. 2020 à 11:52, David Jencks <da...@gmail.com> a
écrit :

> I don’t recall having this problem getting Geronimo to pass the TCK, but
> maybe these tests were added since then.
>
> Are you sure there isn’t something in the adapter/test harness goo that
> you have to write that cleans up transactional state between tests?  I do
> remember getting everything working in the test adapter was rather
> difficult.
>
> David Jencks
>
> On Nov 13, 2020, at 12:59 AM, Jean-Louis Monteiro <
> jlmonteiro@tomitribe.com> wrote:
>
> Hi all,
>
> Been trying to look at JTA support and see if TomEE passes TCKs.
> Looks like we are failing on most of the tests in the package
>
> com.sun.ts.tests.jta.ee.transactional.*
>
> After digging into why they were failing I realized, transactions were
> leaking into the thread context (ThreadLocal) and therefore if the test was
> randomly picking a test that was badly used before, it would fail on
> UserTransaction.begin because nested transactions aren't allowed.
>
> After digging into TomEE and Geronimo Transaction I realized i was
> probably the TCK test which was not too good.
>
> Here is where it fails.
>
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jta/ee/transactional/Client.java#L420
>
> I see only begin() but no rollback/commit in some methods which means that
> some transactions may leak.
>
> What do you think?
> I will open a challenge against the TCK if we are all on the same page
> with the analysis
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
>
>

-- 
Jean-Louis

Re: Challenge Transaction (JTA) TCK tests

Posted by David Jencks <da...@gmail.com>.
I don’t recall having this problem getting Geronimo to pass the TCK, but maybe these tests were added since then.

Are you sure there isn’t something in the adapter/test harness goo that you have to write that cleans up transactional state between tests?  I do remember getting everything working in the test adapter was rather difficult.

David Jencks

> On Nov 13, 2020, at 12:59 AM, Jean-Louis Monteiro <jl...@tomitribe.com> wrote:
> 
> Hi all,
> 
> Been trying to look at JTA support and see if TomEE passes TCKs.
> Looks like we are failing on most of the tests in the package 
> 
> com.sun.ts.tests.jta.ee.transactional.*
> 
> After digging into why they were failing I realized, transactions were leaking into the thread context (ThreadLocal) and therefore if the test was randomly picking a test that was badly used before, it would fail on UserTransaction.begin because nested transactions aren't allowed.
> 
> After digging into TomEE and Geronimo Transaction I realized i was probably the TCK test which was not too good.
> 
> Here is where it fails.
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jta/ee/transactional/Client.java#L420 <https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jta/ee/transactional/Client.java#L420>
> 
> I see only begin() but no rollback/commit in some methods which means that some transactions may leak.
> 
> What do you think?
> I will open a challenge against the TCK if we are all on the same page with the analysis
> 
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro <http://twitter.com/jlouismonteiro>
> http://www.tomitribe.com <http://www.tomitribe.com/>