HHH-5275 - Criteria.setLockMode does not work correctly
This commit is contained in:
parent
2eac7c33ec
commit
5071a82458
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue