HHH-5275 - Criteria.setLockMode does not work correctly

This commit is contained in:
Steve Ebersole 2011-12-30 18:48:33 -06:00
parent 2eac7c33ec
commit 5071a82458
1 changed files with 1 additions and 2 deletions

View File

@ -184,7 +184,6 @@ public class LockModeTest extends BaseCoreFunctionalTestCase {
it2.setValue( "changed" );
s.flush();
fail( "Pessimistic lock not obtained/held" );
s.getTransaction().commit();
}
catch ( Exception e ) {
// grr, exception can be any number of types based on database
@ -197,9 +196,9 @@ public class LockModeTest extends BaseCoreFunctionalTestCase {
else {
fail( "Unexpected error type testing pessimistic locking : " + e.getClass().getName() );
}
s.getTransaction().rollback();
}
finally {
s.getTransaction().rollback();
s.close();
}
}