HHH-13553 Fix test failures on SAP HANA

- Skip org.hibernate.test.annotations.query.QueryAndSQLTest.testNativeQueryWithFormulaAttributeWithoutAlias
- Update HANA JDBC driver to fix org.hibernate.test.type.LocalDateTimeTest
This commit is contained in:
Jonathan Bregler 2019-08-08 17:30:56 +02:00 committed by Sanne Grinovero
parent 1d4d018dfa
commit 6841012f78
2 changed files with 4 additions and 2 deletions

View File

@ -116,7 +116,7 @@ ext {
oracle: 'com.oracle.jdbc:ojdbc8:12.2.0.1', oracle: 'com.oracle.jdbc:ojdbc8:12.2.0.1',
mssql: 'com.microsoft.sqlserver:mssql-jdbc:7.2.1.jre8', mssql: 'com.microsoft.sqlserver:mssql-jdbc:7.2.1.jre8',
db2: 'com.ibm.db2:db2jcc:10.5', db2: 'com.ibm.db2:db2jcc:10.5',
hana: 'com.sap.cloud.db.jdbc:ngdbc:2.2.16', // for HANA 1 the minimum required client version is 1.120.20 hana: 'com.sap.cloud.db.jdbc:ngdbc:2.4.59',
jodaTime: "joda-time:joda-time:${jodaTimeVersion}", jodaTime: "joda-time:joda-time:${jodaTimeVersion}",

View File

@ -22,6 +22,7 @@ import org.hibernate.Session;
import org.hibernate.Transaction; import org.hibernate.Transaction;
import org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl; import org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.AbstractHANADialect;
import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.PostgreSQL81Dialect; import org.hibernate.dialect.PostgreSQL81Dialect;
import org.hibernate.dialect.PostgreSQL9Dialect; import org.hibernate.dialect.PostgreSQL9Dialect;
@ -31,7 +32,7 @@ import org.hibernate.dialect.SybaseDialect;
import org.hibernate.dialect.function.SQLFunction; import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.stat.Statistics; import org.hibernate.stat.Statistics;
import org.hibernate.type.StandardBasicTypes; import org.hibernate.type.StandardBasicTypes;
import org.hibernate.testing.RequiresDialect;
import org.hibernate.testing.SkipForDialect; import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -94,6 +95,7 @@ public class QueryAndSQLTest extends BaseCoreFunctionalTestCase {
} }
@Test @Test
@SkipForDialect(value = AbstractHANADialect.class, comment = "invalid name of function or procedure: SYSDATE")
public void testNativeQueryWithFormulaAttributeWithoutAlias() { public void testNativeQueryWithFormulaAttributeWithoutAlias() {
String sql = "select TABLE_NAME , sysdate() from all_tables where TABLE_NAME = 'AUDIT_ACTIONS' "; String sql = "select TABLE_NAME , sysdate() from all_tables where TABLE_NAME = 'AUDIT_ACTIONS' ";
Session s = openSession(); Session s = openSession();