|
From: <hib...@li...> - 2006-07-14 09:42:43
|
Author: max...@jb...
Date: 2006-07-14 05:42:39 -0400 (Fri, 14 Jul 2006)
New Revision: 10122
Modified:
trunk/Hibernate3/test/org/hibernate/test/TestCase.java
Log:
make the nightly build only fail if something unexpected occurs.
Modified: trunk/Hibernate3/test/org/hibernate/test/TestCase.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/TestCase.java 2006-07-14 03:52:37 UTC (rev 10121)
+++ trunk/Hibernate3/test/org/hibernate/test/TestCase.java 2006-07-14 09:42:39 UTC (rev 10122)
@@ -3,7 +3,6 @@
import java.sql.Blob;
import java.sql.Clob;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -379,4 +378,27 @@
protected SessionFactoryImplementor sfi() {
return ( SessionFactoryImplementor ) getSessions();
}
+
+ public void runBare() throws Throwable {
+ assertNotNull(getName());
+ if(Boolean.getBoolean( "hibernate.test.validatefailureexpected" )) {
+ if(getName().endsWith( "FailureExpected" ) ) {
+ Throwable t = null;
+ try {
+ super.runBare();
+ } catch(Throwable afe) {
+ t = afe;
+ }
+ if(t==null) {
+ fail("Test where marked as FailureExpected, but did not fail!");
+ } else {
+ reportSkip( "ignoring *FailuredExpected methods", "Failed with: " + t.toString() );
+ }
+ } else {
+ super.runBare();
+ }
+ } else {
+ super.runBare();
+ }
+ }
}
\ No newline at end of file
|