HHH-3691 : Sybase does not support Blobs and Clobs; skip unit tests that use Blobs/Clobs
git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@15877 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
9eb89caa1d
commit
96bd4ad79c
|
@ -123,6 +123,10 @@ public class SQLServerDialect extends SybaseDialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsExpectedLobUsagePattern() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean supportsLobValueChangePropogation() {
|
public boolean supportsLobValueChangePropogation() {
|
||||||
// note: at least my local SQL Server 2005 Express shows this not working...
|
// note: at least my local SQL Server 2005 Express shows this not working...
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -228,6 +228,10 @@ public class SybaseDialect extends Dialect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsExpectedLobUsagePattern() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean supportsEmptyInList() {
|
public boolean supportsEmptyInList() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import junit.framework.Test;
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
|
||||||
import org.hibernate.junit.functional.FunctionalTestCase;
|
import org.hibernate.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -33,8 +32,8 @@ public class InterfaceProxyTest extends FunctionalTestCase {
|
||||||
|
|
||||||
public void testInterfaceProxies() {
|
public void testInterfaceProxies() {
|
||||||
|
|
||||||
if ( getDialect() instanceof PostgreSQLDialect ) {
|
if ( ! getDialect().supportsExpectedLobUsagePattern() ) {
|
||||||
// TODO : why?
|
reportSkip( "database/driver does not support expected LOB usage pattern", "LOB support" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.hibernate.dialect.MckoiDialect;
|
||||||
import org.hibernate.dialect.MySQLDialect;
|
import org.hibernate.dialect.MySQLDialect;
|
||||||
import org.hibernate.dialect.SybaseDialect;
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
import org.hibernate.dialect.TimesTenDialect;
|
import org.hibernate.dialect.TimesTenDialect;
|
||||||
|
import org.hibernate.dialect.SQLServerDialect;
|
||||||
import org.hibernate.dialect.Oracle9iDialect;
|
import org.hibernate.dialect.Oracle9iDialect;
|
||||||
import org.hibernate.dialect.function.SQLFunction;
|
import org.hibernate.dialect.function.SQLFunction;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
@ -496,6 +497,14 @@ public class SQLFunctionsTest extends LegacyTestCase {
|
||||||
//s.refresh(b);
|
//s.refresh(b);
|
||||||
//assertTrue( b.getClob() instanceof ClobImpl );
|
//assertTrue( b.getClob() instanceof ClobImpl );
|
||||||
s.flush();
|
s.flush();
|
||||||
|
|
||||||
|
// Sybase ASE does not support ResultSet.getBlob(String)
|
||||||
|
if ( getDialect() instanceof SybaseDialect && ! ( getDialect() instanceof SQLServerDialect ) ) {
|
||||||
|
s.connection().rollback();
|
||||||
|
s.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
s.refresh(b);
|
s.refresh(b);
|
||||||
//b.getBlob().setBytes( 2, "abc".getBytes() );
|
//b.getBlob().setBytes( 2, "abc".getBytes() );
|
||||||
b.getClob().getSubString(2, 3);
|
b.getClob().getSubString(2, 3);
|
||||||
|
|
|
@ -28,6 +28,9 @@ package org.hibernate.test.lob;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
|
import org.hibernate.dialect.Dialect;
|
||||||
|
import org.hibernate.dialect.SybaseDialect;
|
||||||
|
import org.hibernate.dialect.SQLServerDialect;
|
||||||
import org.hibernate.junit.functional.FunctionalTestCase;
|
import org.hibernate.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -50,11 +53,17 @@ public class SerializableTypeTest extends FunctionalTestCase {
|
||||||
return new FunctionalTestClassTestSuite( SerializableTypeTest.class );
|
return new FunctionalTestClassTestSuite( SerializableTypeTest.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getCacheConcurrencyStrategy() {
|
public String getCacheConcurrencyStrategy() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNewSerializableType() {
|
public void testNewSerializableType() {
|
||||||
|
// Sybase ASE does not support ResultSet.getBlob(String)
|
||||||
|
if ( getDialect() instanceof SybaseDialect && ! ( getDialect() instanceof SQLServerDialect ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final String payloadText = "Initial payload";
|
final String payloadText = "Initial payload";
|
||||||
|
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
|
|
|
@ -6,7 +6,6 @@ import junit.framework.Test;
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.dialect.PostgreSQLDialect;
|
|
||||||
import org.hibernate.junit.functional.FunctionalTestCase;
|
import org.hibernate.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
|
@ -57,7 +56,10 @@ public class MixedTest extends FunctionalTestCase {
|
||||||
t.commit();
|
t.commit();
|
||||||
s.close();
|
s.close();
|
||||||
|
|
||||||
if ( getDialect() instanceof PostgreSQLDialect ) return;
|
if ( ! getDialect().supportsExpectedLobUsagePattern() ) {
|
||||||
|
reportSkip( "database/driver does not support expected LOB usage pattern", "LOB support" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
s = openSession( new DocumentInterceptor() );
|
s = openSession( new DocumentInterceptor() );
|
||||||
t = s.beginTransaction();
|
t = s.beginTransaction();
|
||||||
|
|
Loading…
Reference in New Issue