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