HHH-17800 Fix CockroachDB transaction error when forcing connection acquisition

This commit is contained in:
Marco Belladelli 2024-03-04 10:59:12 +01:00
parent 841e4bedc7
commit 2716202caf
1 changed files with 2 additions and 2 deletions

View File

@ -503,7 +503,7 @@ public class UnionSubclassTest extends BaseSessionFactoryFunctionalTest {
inTransaction( s1 -> { inTransaction( s1 -> {
// Force connection acquisition // Force connection acquisition
s1.createQuery( "select 1" ).getResultList(); s1.getJdbcCoordinator().getLogicalConnection().getPhysicalConnection();
// Transaction used by s1 is already started. // Transaction used by s1 is already started.
// Assert that the Connection is already physically connected. // Assert that the Connection is already physically connected.
@ -524,7 +524,7 @@ public class UnionSubclassTest extends BaseSessionFactoryFunctionalTest {
inTransaction( s2 -> { inTransaction( s2 -> {
// Force connection acquisition // Force connection acquisition
s2.createQuery( "select 1" ).getResultList(); s2.getJdbcCoordinator().getLogicalConnection().getPhysicalConnection();
// Check same assertions for s2 as was done for s1. // Check same assertions for s2 as was done for s1.
assertTrue( s2.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected() ); assertTrue( s2.getJdbcCoordinator().getLogicalConnection().isPhysicallyConnected() );
assertEquals( assertEquals(