| In many test we use the clause:
if (transaction.getStatus() == TransactionStatus.ACTIVE) {
transaction.rollback();
}
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 to use the method EntityTransaction::isActive() to rollback in any case of transaction in progress and be always consistent. |