HHH-6773 test fails on sybase
This commit is contained in:
parent
9509f1d8bf
commit
388ceaf186
|
@ -32,6 +32,8 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.jdbc.Work;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.hibernate.type.descriptor.JdbcTypeNameMapper;
|
||||
|
||||
|
@ -41,6 +43,7 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@RequiresDialectFeature( DialectChecks.SupportsExpectedLobUsagePattern.class )
|
||||
public class BasicOperationsTest extends BaseCoreFunctionalTestCase {
|
||||
@Override
|
||||
protected Class<?>[] getAnnotatedClasses() {
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.hibernate.Transaction;
|
|||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
import org.hibernate.dialect.SQLServerDialect;
|
||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||
import org.hibernate.stat.Statistics;
|
||||
import org.hibernate.test.annotations.A320;
|
||||
import org.hibernate.test.annotations.A320b;
|
||||
|
@ -62,26 +63,16 @@ import static org.junit.Assert.fail;
|
|||
public class QueryAndSQLTest extends BaseCoreFunctionalTestCase {
|
||||
|
||||
@Test
|
||||
@SkipForDialect(value = {SQLServerDialect.class})
|
||||
public void testNativeQueryWithFormulaAttribute() {
|
||||
String sql = "select t.table_name as {t.tableName}, sysdate() as {t.daysOld} from ALL_TABLES t where t.table_name = 'AUDIT_ACTIONS' ";
|
||||
String sql2 = "select table_name as t_name, sysdate() as t_time from ALL_TABLES where table_name = 'AUDIT_ACTIONS' ";
|
||||
Session s = openSession();
|
||||
s.beginTransaction();
|
||||
s.createSQLQuery( sql ).addEntity( "t", AllTables.class ).list();
|
||||
s.createSQLQuery( sql2 ).setResultSetMapping( "all" ).list();
|
||||
SQLQuery q = s.createSQLQuery( sql2 );
|
||||
q.addRoot( "t", AllTables.class ).addProperty( "tableName", "t_name" ).addProperty( "daysOld", "t_time" );
|
||||
q.list();
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
String sql,sql2;
|
||||
if ( getDialect() instanceof SQLServerDialect || getDialect() instanceof SybaseASE15Dialect ) {
|
||||
sql = "select t.table_name as {t.tableName}, getdate() as {t.daysOld} from ALL_TABLES t where t.table_name = 'AUDIT_ACTIONS' ";
|
||||
sql2 = "select table_name as t_name, getdate() as t_time from ALL_TABLES where table_name = 'AUDIT_ACTIONS' ";
|
||||
}
|
||||
else {
|
||||
sql = "select t.table_name as {t.tableName}, sysdate() as {t.daysOld} from ALL_TABLES t where t.table_name = 'AUDIT_ACTIONS' ";
|
||||
sql2 = "select table_name as t_name, sysdate() as t_time from ALL_TABLES where table_name = 'AUDIT_ACTIONS' ";
|
||||
}
|
||||
|
||||
@Test
|
||||
@RequiresDialect(value = {SQLServerDialect.class})
|
||||
public void testNativeQueryWithFormulaAttributeSqlServer() {
|
||||
String sql = "select t.table_name as {t.tableName}, getdate() as {t.daysOld} from ALL_TABLES t where t.table_name = 'AUDIT_ACTIONS' ";
|
||||
String sql2 = "select table_name as t_name, getdate() as t_time from ALL_TABLES where table_name = 'AUDIT_ACTIONS' ";
|
||||
Session s = openSession();
|
||||
s.beginTransaction();
|
||||
s.createSQLQuery( sql ).addEntity( "t", AllTables.class ).list();
|
||||
|
|
|
@ -31,6 +31,8 @@ import org.junit.Test;
|
|||
import org.hibernate.Session;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.hibernate.dialect.HSQLDialect;
|
||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||
import org.hibernate.testing.SkipForDialect;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -75,6 +77,7 @@ public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@SkipForDialect( value = SybaseASE15Dialect.class, jiraKey = "HHH-6788")
|
||||
public void testCustomColumnReadAndWrite() {
|
||||
Session s = openSession();
|
||||
org.hibernate.Transaction t = s.beginTransaction();
|
||||
|
|
Loading…
Reference in New Issue