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