db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r532838 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java
Date Thu, 26 Apr 2007 19:35:10 GMT
Author: kahatlen
Date: Thu Apr 26 12:35:08 2007
New Revision: 532838

URL: http://svn.apache.org/viewvc?view=rev&rev=532838
Log:
Fixed regression test failure when running from insane jars.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java?view=diff&rev=532838&r1=532837&r2=532838
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_Util.java Thu
Apr 26 12:35:08 2007
@@ -35,7 +35,6 @@
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.locks.*;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.shared.common.sanity.AssertFailure;
 
 import org.apache.derby.iapi.error.StandardException;
 
@@ -1163,12 +1162,15 @@
 			if (!se.getMessageId().equals("08000")) {
 				throw se;
 			}
-		} catch (AssertFailure af) {
+		} catch (RuntimeException e) {
 			// When running in sane mode, an AssertFailure will be thrown if we
-			// try to double latch a page.
+			// try to double latch a page. The AssertFailure class is not
+			// available in insane jars, so we cannot reference the class
+			// directly.
 			if (!(SanityManager.DEBUG &&
-				  af.getMessage().endsWith("Attempted to latch page twice"))) {
-				throw af;
+				  e.getClass().getName().endsWith(".sanity.AssertFailure") &&
+				  e.getMessage().endsWith("Attempted to latch page twice"))) {
+				throw e;
 			}
 		}
 



Mime
View raw message