Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Transactional(rollbackOnly = true) is bypassed running tests through TestSuite #63

Closed
danielemaddaluno opened this issue May 15, 2017 · 1 comment

Comments

@danielemaddaluno
Copy link

danielemaddaluno commented May 15, 2017

I've found a strange behavior using @Transactional(rollbackOnly = true) on method of Test classes used inside a JUnitTestSuite:

I've tried to reproduce this problem inside the mybatis-cdi project forked but I didn't manage to.

So to reproduce the problem I'll refer to my example-project.
I've created two suites:

I expected to run without any error both of them without errors (with an empty test table), but only the first one works fine.
The @Transactional(rollbackOnly = true) on the method UserMapperTestReadWrite.t1_insert is considered only on the first suite, in the second one it is completely bypassed.

Individually each class referred from the suites runs with no errors and failures.

@mnesarco
Copy link
Member

mnesarco commented Oct 4, 2017

Hi @danielemaddaluno , this is a very strange case, but it is maybe more related to your Test environment than to mybatis-cdi itself. Also this is a very old issue without more details. I am closing this, if you have more info and are still interested, please reopen this.

@mnesarco mnesarco closed this as completed Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants