HHH-12313: org.hibernate.jpa.test.transaction.TransactionCommitFailureTest fails on HANA
This commit is contained in:
parent
94fe106fb5
commit
17bd61033d
|
@ -72,6 +72,8 @@ import org.hibernate.exception.LockAcquisitionException;
|
||||||
import org.hibernate.exception.LockTimeoutException;
|
import org.hibernate.exception.LockTimeoutException;
|
||||||
import org.hibernate.exception.SQLGrammarException;
|
import org.hibernate.exception.SQLGrammarException;
|
||||||
import org.hibernate.exception.spi.SQLExceptionConversionDelegate;
|
import org.hibernate.exception.spi.SQLExceptionConversionDelegate;
|
||||||
|
import org.hibernate.internal.CoreLogging;
|
||||||
|
import org.hibernate.internal.CoreMessageLogger;
|
||||||
import org.hibernate.internal.util.JdbcExceptionHelper;
|
import org.hibernate.internal.util.JdbcExceptionHelper;
|
||||||
import org.hibernate.internal.util.StringHelper;
|
import org.hibernate.internal.util.StringHelper;
|
||||||
import org.hibernate.mapping.Table;
|
import org.hibernate.mapping.Table;
|
||||||
|
@ -109,6 +111,8 @@ import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor;
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractHANADialect extends Dialect {
|
public abstract class AbstractHANADialect extends Dialect {
|
||||||
|
|
||||||
|
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( AbstractHANADialect.class );
|
||||||
|
|
||||||
private static final AbstractLimitHandler LIMIT_HANDLER = new AbstractLimitHandler() {
|
private static final AbstractLimitHandler LIMIT_HANDLER = new AbstractLimitHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1497,8 +1501,11 @@ public abstract class AbstractHANADialect extends Dialect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e) {
|
catch (Exception e) {
|
||||||
// ignore
|
LOG.debug(
|
||||||
|
"An error occurred while trying to determing the value of the HANA parameter indexserver.ini / session / max_lob_prefetch_size. Using the default value "
|
||||||
|
+ maxLobPrefetchSizeDefault,
|
||||||
|
e );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if ( conn != null ) {
|
if ( conn != null ) {
|
||||||
|
|
|
@ -21,7 +21,6 @@ import org.hibernate.cfg.Environment;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl;
|
import org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl;
|
||||||
import org.hibernate.jpa.boot.spi.Bootstrap;
|
import org.hibernate.jpa.boot.spi.Bootstrap;
|
||||||
import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
|
|
||||||
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter;
|
||||||
import org.hibernate.jpa.test.SettingsGenerator;
|
import org.hibernate.jpa.test.SettingsGenerator;
|
||||||
|
|
||||||
|
@ -48,10 +47,12 @@ public class TransactionCommitFailureTest extends BaseUnitTestCase {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
final Map settings = basicSettings();
|
// static variables need to be initialized before the EMF is set up, because they can be referenced during EMF setup via the connection provider.
|
||||||
emf = Bootstrap.getEntityManagerFactoryBuilder( new PersistenceUnitDescriptorAdapter(), settings ).build();
|
|
||||||
transactionFailureTrigger = new AtomicBoolean();
|
transactionFailureTrigger = new AtomicBoolean();
|
||||||
connectionIsOpen = new AtomicBoolean();
|
connectionIsOpen = new AtomicBoolean();
|
||||||
|
|
||||||
|
final Map settings = basicSettings();
|
||||||
|
emf = Bootstrap.getEntityManagerFactoryBuilder( new PersistenceUnitDescriptorAdapter(), settings ).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
|
Loading…
Reference in New Issue