HHH-5275 - Criteria.setLockMode does not work correctly
This commit is contained in:
parent
f6dec69c8c
commit
2eac7c33ec
|
@ -184,6 +184,7 @@ public class LockModeTest extends BaseCoreFunctionalTestCase {
|
||||||
it2.setValue( "changed" );
|
it2.setValue( "changed" );
|
||||||
s.flush();
|
s.flush();
|
||||||
fail( "Pessimistic lock not obtained/held" );
|
fail( "Pessimistic lock not obtained/held" );
|
||||||
|
s.getTransaction().commit();
|
||||||
}
|
}
|
||||||
catch ( Exception e ) {
|
catch ( Exception e ) {
|
||||||
// grr, exception can be any number of types based on database
|
// grr, exception can be any number of types based on database
|
||||||
|
@ -196,9 +197,9 @@ public class LockModeTest extends BaseCoreFunctionalTestCase {
|
||||||
else {
|
else {
|
||||||
fail( "Unexpected error type testing pessimistic locking : " + e.getClass().getName() );
|
fail( "Unexpected error type testing pessimistic locking : " + e.getClass().getName() );
|
||||||
}
|
}
|
||||||
|
s.getTransaction().rollback();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
s.getTransaction().commit();
|
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue