[hibernate-commits] Hibernate SVN: r19403 - core/branches/Branch_3_3_2_GA_CP/testing/src/main/java/org/hibernate/test/annotations.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Fri May 7 08:23:50 EDT 2010
Author: stliu
Date: 2010-05-07 08:23:49 -0400 (Fri, 07 May 2010)
New Revision: 19403
Modified:
core/branches/Branch_3_3_2_GA_CP/testing/src/main/java/org/hibernate/test/annotations/HibernateTestCase.java
Log:
JBPAPP-4235 HHH-4822 Add @FailureExpected annotation to annotations and entitymananger modules to allow the skipping of tests
Modified: core/branches/Branch_3_3_2_GA_CP/testing/src/main/java/org/hibernate/test/annotations/HibernateTestCase.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testing/src/main/java/org/hibernate/test/annotations/HibernateTestCase.java 2010-05-07 12:00:31 UTC (rev 19402)
+++ core/branches/Branch_3_3_2_GA_CP/testing/src/main/java/org/hibernate/test/annotations/HibernateTestCase.java 2010-05-07 12:23:49 UTC (rev 19403)
@@ -60,23 +60,6 @@
protected static Configuration cfg;
private static Class<?> lastTestClass;
-
- /**
- * Flag indicating whether the test should be run or skipped.
- */
- private boolean runTest = true;
-
- /**
- * List of required dialect for the current {@code runMethod}. If the list is empty any dialect is allowed.
- * Otherwise the current dialect or a superclass of the current dialect must be in the list.
- */
- private final Set<Class<? extends Dialect>> requiredDialectList = new HashSet<Class<? extends Dialect>>();
-
- /**
- * List of dialects for which the current {@code runMethod} should be skipped.
- */
- private final Set<Class<? extends Dialect>> skipForDialectList = new HashSet<Class<? extends Dialect>>();
-
public HibernateTestCase() {
super();
}
@@ -206,7 +189,10 @@
}
}
}
-
+ // finally check against runForCurrentDialect
+ if ( !runForCurrentDialect( dialect )){
+ return buildSkip( dialect, null, null );
+ }
return null;
}
@@ -244,28 +230,8 @@
return this.getClass().getName() + "#" + this.getName();
}
- protected boolean runForCurrentDialect() {
- boolean runTestForCurrentDialect = true;
-
- // check whether the current dialect is assignableFrom from any of the specified required dialects.
- for ( Class<? extends Dialect> dialect : requiredDialectList ) {
- if ( dialect.isAssignableFrom( Dialect.getDialect().getClass() ) ) {
- runTestForCurrentDialect = true;
- break;
- }
- runTestForCurrentDialect = false;
- }
-
- // check whether the current dialect is assignableFrom from any of the specified skip for dialects.
- for ( Class<? extends Dialect> dialect : skipForDialectList ) {
- if ( dialect.isAssignableFrom( Dialect.getDialect().getClass() ) ) {
- runTestForCurrentDialect = false;
- break;
- }
- runTestForCurrentDialect = true;
- }
-
- return runTestForCurrentDialect;
+ protected boolean runForCurrentDialect( Dialect dialect ) {
+ return true;
}
private Method findTestMethod() {
More information about the hibernate-commits
mailing list