[hibernate-commits] Hibernate SVN: r15877 - in core/branches/Branch_3_2: test/org/hibernate/test/interfaceproxy and 3 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue Feb 3 19:58:42 EST 2009
Author: gbadner
Date: 2009-02-03 19:58:42 -0500 (Tue, 03 Feb 2009)
New Revision: 15877
Modified:
core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java
core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java
core/branches/Branch_3_2/test/org/hibernate/test/interfaceproxy/InterfaceProxyTest.java
core/branches/Branch_3_2/test/org/hibernate/test/legacy/SQLFunctionsTest.java
core/branches/Branch_3_2/test/org/hibernate/test/lob/SerializableTypeTest.java
core/branches/Branch_3_2/test/org/hibernate/test/mixed/MixedTest.java
Log:
HHH-3691 : Sybase does not support Blobs and Clobs; skip unit tests that use Blobs/Clobs
Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -112,9 +112,9 @@
return false;
}
- public boolean supportsCascadeDelete() {
- return true;
- }
+ public boolean supportsCascadeDelete() {
+ return true;
+ }
public boolean supportsCircularCascadeDeleteConstraints() {
// SQL Server (at least up through 2005) does not support defining
@@ -123,6 +123,10 @@
return false;
}
+ public boolean supportsExpectedLobUsagePattern() {
+ return true;
+ }
+
public boolean supportsLobValueChangePropogation() {
// note: at least my local SQL Server 2005 Express shows this not working...
return false;
Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -228,6 +228,10 @@
return false;
}
+ public boolean supportsExpectedLobUsagePattern() {
+ return false;
+ }
+
public boolean supportsEmptyInList() {
return false;
}
Modified: core/branches/Branch_3_2/test/org/hibernate/test/interfaceproxy/InterfaceProxyTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/interfaceproxy/InterfaceProxyTest.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/test/org/hibernate/test/interfaceproxy/InterfaceProxyTest.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -6,7 +6,6 @@
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.Transaction;
-import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
@@ -33,8 +32,8 @@
public void testInterfaceProxies() {
- if ( getDialect() instanceof PostgreSQLDialect ) {
- // TODO : why?
+ if ( ! getDialect().supportsExpectedLobUsagePattern() ) {
+ reportSkip( "database/driver does not support expected LOB usage pattern", "LOB support" );
return;
}
Modified: core/branches/Branch_3_2/test/org/hibernate/test/legacy/SQLFunctionsTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/legacy/SQLFunctionsTest.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/test/org/hibernate/test/legacy/SQLFunctionsTest.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -25,6 +25,7 @@
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SybaseDialect;
import org.hibernate.dialect.TimesTenDialect;
+import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.dialect.Oracle9iDialect;
import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
@@ -496,6 +497,14 @@
//s.refresh(b);
//assertTrue( b.getClob() instanceof ClobImpl );
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);
//b.getBlob().setBytes( 2, "abc".getBytes() );
b.getClob().getSubString(2, 3);
Modified: core/branches/Branch_3_2/test/org/hibernate/test/lob/SerializableTypeTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/lob/SerializableTypeTest.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/test/org/hibernate/test/lob/SerializableTypeTest.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -28,6 +28,9 @@
import junit.framework.Test;
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.FunctionalTestClassTestSuite;
@@ -50,11 +53,17 @@
return new FunctionalTestClassTestSuite( SerializableTypeTest.class );
}
+
public String getCacheConcurrencyStrategy() {
return null;
}
public void testNewSerializableType() {
+ // Sybase ASE does not support ResultSet.getBlob(String)
+ if ( getDialect() instanceof SybaseDialect && ! ( getDialect() instanceof SQLServerDialect ) ) {
+ return;
+ }
+
final String payloadText = "Initial payload";
Session s = openSession();
Modified: core/branches/Branch_3_2/test/org/hibernate/test/mixed/MixedTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/mixed/MixedTest.java 2009-02-04 00:50:58 UTC (rev 15876)
+++ core/branches/Branch_3_2/test/org/hibernate/test/mixed/MixedTest.java 2009-02-04 00:58:42 UTC (rev 15877)
@@ -6,7 +6,6 @@
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.Transaction;
-import org.hibernate.dialect.PostgreSQLDialect;
import org.hibernate.junit.functional.FunctionalTestCase;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
@@ -57,7 +56,10 @@
t.commit();
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() );
t = s.beginTransaction();
More information about the hibernate-commits
mailing list