Fix Sybase ASE nightly failure of NationalizedTest
This commit is contained in:
parent
de3408662c
commit
ed5f1d82d1
|
@ -10,6 +10,8 @@ import jakarta.persistence.Id;
|
|||
import org.hibernate.annotations.Nationalized;
|
||||
import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase;
|
||||
|
||||
import org.hibernate.testing.orm.junit.DialectFeatureChecks;
|
||||
import org.hibernate.testing.orm.junit.RequiresDialectFeature;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;
|
||||
|
@ -18,6 +20,7 @@ import static org.junit.Assert.assertEquals;
|
|||
/**
|
||||
* @author Vlad Mihalcea
|
||||
*/
|
||||
@RequiresDialectFeature(feature = DialectFeatureChecks.SupportsUnicodeNClob.class)
|
||||
public class NationalizedTest extends BaseEntityManagerFunctionalTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -66,6 +66,7 @@ import org.hibernate.dialect.OracleDialect;
|
|||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
import org.hibernate.dialect.SQLServerDialect;
|
||||
import org.hibernate.dialect.SpannerDialect;
|
||||
import org.hibernate.dialect.SybaseASEDialect;
|
||||
import org.hibernate.dialect.SybaseDialect;
|
||||
import org.hibernate.dialect.SybaseDriverKind;
|
||||
import org.hibernate.dialect.TiDBDialect;
|
||||
|
@ -1023,6 +1024,15 @@ abstract public class DialectFeatureChecks {
|
|||
}
|
||||
}
|
||||
|
||||
public static class SupportsUnicodeNClob implements DialectFeatureCheck {
|
||||
@Override
|
||||
public boolean apply(Dialect dialect) {
|
||||
return !(dialect instanceof SybaseASEDialect aseDialect)
|
||||
// The jconn driver apparently doesn't support unicode characters
|
||||
|| aseDialect.getDriverKind() == SybaseDriverKind.JTDS;
|
||||
}
|
||||
}
|
||||
|
||||
private static final HashMap<Dialect, SqmFunctionRegistry> FUNCTION_REGISTRIES = new HashMap<>();
|
||||
|
||||
public static boolean definesFunction(Dialect dialect, String functionName) {
|
||||
|
|
Loading…
Reference in New Issue