db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1306620 - in /db/derby/code/branches/10.8: ./ java/client/org/apache/derby/client/net/NetCursor.java java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Date Wed, 28 Mar 2012 22:06:14 GMT
Author: myrnavl
Date: Wed Mar 28 22:06:14 2012
New Revision: 1306620

URL: http://svn.apache.org/viewvc?rev=1306620&view=rev
Log:
DERBY-5377; AssertionFailedError in testCaseCS4595B_NonUniqueIndex in AccessTest
  merge of revisions 1306596 and 1306600 from trunk to ignore the check on
  pages visited for 3 queries.

Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java   (props
changed)
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1306596,1306600

Propchange: db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java:r1306596,1306600

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java?rev=1306620&r1=1306619&r2=1306620&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/store/AccessTest.java
Wed Mar 28 22:06:14 2012
@@ -401,11 +401,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));
@@ -1712,9 +1714,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
@@ -1724,9 +1729,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.
@@ -1738,9 +1746,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);
 
         st.execute("drop table foo");



Mime
View raw message