HHH-6807 skip this test for Sybase ASE
This commit is contained in:
parent
937f395834
commit
c575f6e5f5
|
@ -26,11 +26,9 @@ package org.hibernate.test.lob;
|
|||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.dialect.SybaseASE15Dialect;
|
||||
import org.hibernate.internal.util.collections.ArrayHelper;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.hibernate.testing.SkipForDialect;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
|
@ -41,8 +39,7 @@ import static org.junit.Assert.assertTrue;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
@TestForIssue( jiraKey = "HHH-2680" )
|
||||
@RequiresDialectFeature( DialectChecks.SupportsExpectedLobUsagePattern.class )
|
||||
@SkipForDialect( value = SybaseASE15Dialect.class, jiraKey = "HHH-6807")
|
||||
@RequiresDialectFeature( {DialectChecks.SupportsExpectedLobUsagePattern.class, DialectChecks.SupportsLobValueChangePropogation.class} ) // Skip for Sybase. HHH-6807
|
||||
public class LobMergeTest extends BaseCoreFunctionalTestCase {
|
||||
private static final int LOB_SIZE = 10000;
|
||||
|
||||
|
|
|
@ -151,4 +151,10 @@ abstract public class DialectChecks {
|
|||
return dialect.supportsExistsInSelect();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SupportsLobValueChangePropogation implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.supportsLobValueChangePropogation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public @interface RequiresDialectFeature {
|
|||
/**
|
||||
* @return Class which checks the necessary dialect feature
|
||||
*/
|
||||
Class<? extends DialectCheck> value();
|
||||
Class<? extends DialectCheck>[] value();
|
||||
|
||||
/**
|
||||
* Comment describing the reason why the feature is required.
|
||||
|
|
|
@ -251,11 +251,13 @@ public class CustomRunner extends BlockJUnit4ClassRunner {
|
|||
// @RequiresDialectFeature
|
||||
RequiresDialectFeature requiresDialectFeatureAnn = Helper.locateAnnotation( RequiresDialectFeature.class, frameworkMethod, getTestClass() );
|
||||
if ( requiresDialectFeatureAnn != null ) {
|
||||
Class<? extends DialectCheck> checkClass = requiresDialectFeatureAnn.value();
|
||||
try {
|
||||
DialectCheck check = checkClass.newInstance();
|
||||
if ( !check.isMatch( dialect ) ) {
|
||||
return buildIgnore( requiresDialectFeatureAnn );
|
||||
boolean foundMatch = false;
|
||||
for ( Class<? extends DialectCheck> checkClass : requiresDialectFeatureAnn.value() ) {
|
||||
foundMatch = checkClass.newInstance().isMatch( dialect );
|
||||
if ( !foundMatch ) {
|
||||
return buildIgnore( requiresDialectFeatureAnn );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
|
|
Loading…
Reference in New Issue