File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/test/java/org/mybatis/spring/submitted/xa Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,14 @@ public void testCommitWithExistingTx() throws Exception {
60
60
Assert .assertTrue (userService .checkUserExists (user .getId ()));
61
61
}
62
62
63
+ // TODO when the outer JTA tx is rolledback,
64
+ // SqlSession should be rolledback but it is committed
65
+ // because Spring calls beforeCommmit from its TX interceptor
66
+ // then, the JTA TX may be rolledback.
63
67
@ Test
64
68
public void testRollbackWithExistingTx () throws Exception {
65
69
userTransaction .begin ();
66
- User user = new User (4 , "Pocoyo" );
70
+ User user = new User (5 , "Pocoyo" );
67
71
userService .saveWithNoFailure (user );
68
72
userTransaction .rollback ();
69
73
Assert .assertFalse (userService .checkUserExists (user .getId ()));
You can’t perform that action at this time.
0 commit comments