db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1616164 - in /db/derby/code/branches/10.11: ./ java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java
Date Wed, 06 Aug 2014 11:23:19 GMT
Author: kahatlen
Date: Wed Aug  6 11:23:19 2014
New Revision: 1616164

URL: http://svn.apache.org/r1616164
Log:
DERBY-6336: Print more information when StalePlansTest fails

Merged revision 1616163 from trunk.

Modified:
    db/derby/code/branches/10.11/   (props changed)
    db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java

Propchange: db/derby/code/branches/10.11/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1616163

Modified: db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java?rev=1616164&r1=1616163&r2=1616164&view=diff
==============================================================================
--- db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java
(original)
+++ db/derby/code/branches/10.11/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StalePlansTest.java
Wed Aug  6 11:23:19 2014
@@ -31,6 +31,7 @@ import org.apache.derbyTesting.junit.Bas
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
 import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
 import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.RuntimeStatisticsParser;
 import org.apache.derbyTesting.junit.SQLUtilities;
 
 /**
@@ -249,8 +250,12 @@ public class StalePlansTest extends Base
         // Expect this to use table scan, as the above update has basically
         // made all the rows in the table be equal to "1", thus using the index
         // does not help if all the rows are going to qualify.
-        assertTrue(SQLUtilities.
-                   getRuntimeStatisticsParser(stmt).usedTableScan());
+        RuntimeStatisticsParser rsp =
+                SQLUtilities.getRuntimeStatisticsParser(stmt);
+        if (!rsp.usedTableScan()) {
+            // Dump the full plan to help debug DERBY-6336.
+            fail("Expected table scan. Full plan:\n" + rsp.toString());
+        }
 
         // Change the row count significantly
         stmt.executeUpdate("insert into t select c1,c2,c3 from t where c1<128");



Mime
View raw message