In many test we use the clause: {code:java} if (transaction.getStatus() == TransactionStatus.ACTIVE) { transaction.rollback(); } {code} to check and rollback an active transaction. But this clause does not rollback the transaction if the status was **MARKED_ROLLBACK**.
This approach seems to bring some temporary inconsistency problems on test.
Maybe it is better We need to use the method EntityTransaction:: isActive() method to rollback make sure that we don't miss statuses that are still considered active in any case of transaction in progress and be always consistent the future . |
|