Fix SuppliedConnectionTest failure.
This commit is contained in:
parent
ebfab98f2e
commit
713263a71c
|
@ -234,7 +234,6 @@ public abstract class ConnectionManagementTestCase extends BaseNonConfigCoreFunc
|
|||
public final void testManualDisconnectWithOpenResources() throws Throwable {
|
||||
prepare();
|
||||
Session sessionUnderTest = getSessionUnderTest();
|
||||
sessionUnderTest.beginTransaction();
|
||||
|
||||
Silly silly = new Silly( "tester" );
|
||||
sessionUnderTest.save( silly );
|
||||
|
@ -257,8 +256,6 @@ public abstract class ConnectionManagementTestCase extends BaseNonConfigCoreFunc
|
|||
sessionUnderTest.delete( silly );
|
||||
sessionUnderTest.flush();
|
||||
|
||||
sessionUnderTest.getTransaction().commit();
|
||||
|
||||
release( sessionUnderTest );
|
||||
done();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,9 @@ public class SuppliedConnectionTest extends ConnectionManagementTestCase {
|
|||
@Override
|
||||
protected Session getSessionUnderTest() throws Throwable {
|
||||
connectionUnderTest = cp.getConnection();
|
||||
return sessionFactory().withOptions().connection( connectionUnderTest ).openSession();
|
||||
Session session = sessionFactory().withOptions().connection( connectionUnderTest ).openSession();
|
||||
session.beginTransaction();
|
||||
return session;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue