File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
hibernate-core/src/test/java/org/hibernate/test/connections Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,6 @@ public final void testManualDisconnectChain() throws Throwable {
234234 public final void testManualDisconnectWithOpenResources () throws Throwable {
235235 prepare ();
236236 Session sessionUnderTest = getSessionUnderTest ();
237- sessionUnderTest .beginTransaction ();
238237
239238 Silly silly = new Silly ( "tester" );
240239 sessionUnderTest .save ( silly );
@@ -257,8 +256,6 @@ public final void testManualDisconnectWithOpenResources() throws Throwable {
257256 sessionUnderTest .delete ( silly );
258257 sessionUnderTest .flush ();
259258
260- sessionUnderTest .getTransaction ().commit ();
261-
262259 release ( sessionUnderTest );
263260 done ();
264261 }
Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ private void releaseConnectionProvider() {
6363 @ Override
6464 protected Session getSessionUnderTest () throws Throwable {
6565 connectionUnderTest = cp .getConnection ();
66- return sessionFactory ().withOptions ().connection ( connectionUnderTest ).openSession ();
66+ Session session = sessionFactory ().withOptions ().connection ( connectionUnderTest ).openSession ();
67+ session .beginTransaction ();
68+ return session ;
6769 }
6870
6971 @ Override
You can’t perform that action at this time.
0 commit comments