db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1306596 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Date Wed, 28 Mar 2012 21:18:38 GMT
Author: myrnavl
Date: Wed Mar 28 21:18:37 2012
New Revision: 1306596

URL: http://svn.apache.org/viewvc?rev=1306596&view=rev
Log:
DERBY-5377; AssertionFailedError in testCaseCS4595B_NonUniqueIndex in AccessTest
  Adjusting the test to not check for pages visited in assertStatsOK method if
  'null' is passed in for the expPages parameter, and passing in 'null' with the
  three queries that have shown to hit this issue.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java?rev=1306596&r1=1306595&r2=1306596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Wed Mar 28 21:18:37 2012
@@ -402,11 +402,13 @@ public final class AccessTest extends Ba
                 assertTrue(rtsp.findString("Number of deleted rows visited="+expDelRowsV,
1));
 
 
-            assertTrue(
-                "RuntimeStatisticsParser.findstring(Number of pages visited= "
-                    + expPages + ") returned false" +
-                "full runtime statistics = " + rtsp.toString(),
-                rtsp.findString("Number of pages visited=" + expPages, 1));
+            if (expPages != null) {
+                assertTrue(
+                        "RuntimeStatisticsParser.findstring(Number of pages visited= "
+                        + expPages + ") returned false" +
+                        "full runtime statistics = " + rtsp.toString(),
+                        rtsp.findString("Number of pages visited=" + expPages, 1));
+            }
 
             assertTrue(rtsp.findString("Number of rows qualified="+expRowsQ, 1));       
    
             assertTrue(rtsp.findString("Number of rows visited="+expRowsV, 1));
@@ -1717,9 +1719,12 @@ public final class AccessTest extends Ba
         rs = st.executeQuery("select * from foo where a = 2");
 
         JDBC.assertEmpty(rs);
+        // Mostly this returns 1, but sometimes, 2 pages visited.
+        // See DERBY-5377.
+        // Passing in null to prevent uninteresting failures.
         assertStatsOK(st, 
             indexOrConstraint, "FOO", indexName, 
-            "All", "2", "0", "1", "0", "0", "btree",
+            "All", "2", "0", null, "0", "0", "btree",
             ">= on first 1 column(s).","> on first 1 column(s).","None", null);
 
         // select against table with 0 rows
@@ -1729,9 +1734,12 @@ public final class AccessTest extends Ba
         JDBC.assertColumnNames(rs, expColNames);
         JDBC.assertDrainResults(rs, 0);
         
+        // Mostly this returns 1, but sometimes, 2 pages visited.
+        // See DERBY-5377.
+        // Passing in null to prevent uninteresting failures.
         assertStatsOK(st, 
             indexOrConstraint, "FOO", indexName, 
-            "{0}", "1", "0", "1", "0", "0", "btree",
+            "{0}", "1", "0", null, "0", "0", "btree",
             ">= on first 1 column(s).","> on first 1 column(s).","None", null);
 
         // select against table with 0 rows.
@@ -1743,6 +1751,9 @@ public final class AccessTest extends Ba
         JDBC.assertColumnNames(rs, expColNames);
         JDBC.assertDrainResults(rs, 0);
 
+        // Mostly this returns 1, but sometimes, 2 pages visited.
+        // See DERBY-5377.
+        // Passing in null to prevent uninteresting failures.
         assertStatsOK(st, 
             indexOrConstraint, "FOO", indexName, 
             "{0}", "1", "0", "1", "0", "0", "btree",



Mime
View raw message