HHH-6773 test fails on sybase

This commit is contained in:
Strong Liu 2011-11-03 16:43:18 +08:00
parent c04442281b
commit 368ef6713b
6 changed files with 9 additions and 9 deletions

View File

@ -59,7 +59,7 @@ public class Product implements Serializable
public String description; public String description;
@ManyToOne @ManyToOne
@JoinFormula(value="SUBSTR(product_idnf, 1, 3)", @JoinFormula(value="SUBSTRING(product_idnf, 1, 3)",
referencedColumnName="product_idnf") referencedColumnName="product_idnf")
@Fetch(FetchMode.JOIN) @Fetch(FetchMode.JOIN)
private Product productFamily; private Product productFamily;

View File

@ -22,6 +22,7 @@
* Boston, MA 02110-1301 USA * Boston, MA 02110-1301 USA
*/ */
package org.hibernate.test.annotations.target; package org.hibernate.test.annotations.target;
import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
/** /**
@ -29,6 +30,7 @@ import javax.persistence.Embeddable;
*/ */
@Embeddable @Embeddable
public class SizeImpl implements Size { public class SizeImpl implements Size {
@Column(name = "name", nullable = false)
private String name; private String name;
public String getName() { public String getName() {

View File

@ -95,7 +95,7 @@ public class DynamicFilterTest extends BaseCoreFunctionalTestCase {
} }
@Test @Test
@SkipForDialect(IngresDialect.class) @SkipForDialect( value = {SybaseASE15Dialect.class, IngresDialect.class})
public void testSqlSyntaxOfFiltersWithUnions() { public void testSqlSyntaxOfFiltersWithUnions() {
Session session = openSession(); Session session = openSession();
session.enableFilter( "unioned" ); session.enableFilter( "unioned" );

View File

@ -57,7 +57,7 @@ public class AggregationResultTest extends AbstractMetamodelSpecificTest {
product.setPartNumber( ( (long) Integer.MAX_VALUE ) + 1 ); product.setPartNumber( ( (long) Integer.MAX_VALUE ) + 1 );
product.setRating( 1.999f ); product.setRating( 1.999f );
product.setSomeBigInteger( BigInteger.valueOf( 987654321 ) ); product.setSomeBigInteger( BigInteger.valueOf( 987654321 ) );
product.setSomeBigDecimal( BigDecimal.valueOf( 987654.321 ) ); product.setSomeBigDecimal( BigDecimal.valueOf( 987654.32 ) );
em.persist( product ); em.persist( product );
em.getTransaction().commit(); em.getTransaction().commit();
em.close(); em.close();

View File

@ -69,7 +69,7 @@ public class ExpressionsTest extends AbstractMetamodelSpecificTest {
product.setPartNumber( ((long)Integer.MAX_VALUE) + 1 ); product.setPartNumber( ((long)Integer.MAX_VALUE) + 1 );
product.setRating( 1.999f ); product.setRating( 1.999f );
product.setSomeBigInteger( BigInteger.valueOf( 987654321 ) ); product.setSomeBigInteger( BigInteger.valueOf( 987654321 ) );
product.setSomeBigDecimal( BigDecimal.valueOf( 987654.321 ) ); product.setSomeBigDecimal( BigDecimal.valueOf( 987654.32 ) );
em.persist( product ); em.persist( product );
em.getTransaction().commit(); em.getTransaction().commit();
em.close(); em.close();

View File

@ -43,6 +43,7 @@ import org.hibernate.dialect.HSQLDialect;
import org.hibernate.dialect.Oracle10gDialect; import org.hibernate.dialect.Oracle10gDialect;
import org.hibernate.ejb.AvailableSettings; import org.hibernate.ejb.AvailableSettings;
import org.hibernate.ejb.test.BaseEntityManagerFunctionalTestCase; import org.hibernate.ejb.test.BaseEntityManagerFunctionalTestCase;
import org.hibernate.testing.SkipForDialect;
import org.junit.Test; import org.junit.Test;
@ -269,14 +270,11 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase {
} }
@Test @Test
@SkipForDialect( value = HSQLDialect.class)
public void testContendedPessimisticLock() throws Exception { public void testContendedPessimisticLock() throws Exception {
EntityManager em = getOrCreateEntityManager(); EntityManager em = getOrCreateEntityManager();
final EntityManager em2 = createIsolatedEntityManager(); final EntityManager em2 = createIsolatedEntityManager();
// TODO: replace dialect instanceof test with a Dialect.hasCapability (e.g. supportsPessimisticWriteLock)
if ( getDialect() instanceof HSQLDialect) {
log.info("skipping testContendedPessimisticLock");
return;
}
Lock lock = new Lock(); Lock lock = new Lock();
Thread t = null; Thread t = null;
try { try {