Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6660

ResultSet assertion methods fail in upgrade tests

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.11.1.1
    • Fix Version/s: 10.11.1.1
    • Component/s: Test
    • Labels:
      None

      Description

      If a ResultSet assertion method (such as JDBC.assertFullResultSet()) fails, it now attempts to add the entire ResultSet to the error message. This code uses the ResultSet.isClosed() method, which was added in JDBC 4.0. If this code runs on an older version of Derby that doesn't support JDBC 4.0, it fails with an AbstractMethodError because the isClosed() method doesn't exist. This could happen in the upgrade tests.

      See for example this stack trace from a failing test run (http://download.java.net/javadesktop/derby/request_5593747/javadb-task-3900531.html):

      java.lang.AbstractMethodError: org.apache.derby.impl.jdbc.EmbedResultSet20.isClosed()Z
      	at org.apache.derbyTesting.junit.JDBC.addRsToReport(JDBC.java:1832)
      	at org.apache.derbyTesting.junit.JDBC.assertFullResultSetMinion(JDBC.java:1151)
      	at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1048)
      	at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:1005)
      	at org.apache.derbyTesting.junit.JDBC.assertFullResultSet(JDBC.java:963)
      	at org.apache.derbyTesting.functionTests.tests.upgradeTests.Changes10_2.testTriggerInternalVTI(Changes10_2.java:157)
      	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:118)
      	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:440)
      (...)
      

      The AbstractMethodError shadows the original error.

        Attachments

        1. d6660-1a.diff
          7 kB
          Knut Anders Hatlen

          Issue Links

            Activity

              People

              • Assignee:
                knutanders Knut Anders Hatlen
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: