Derby
  1. Derby
  2. DERBY-2915

upgrade test fixture noConnnectionAfterHardUpgrade fails with 10.3.1.1

    Details

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

      Description

      The test fixture noConnectionAfterHardUpgrade in functionTests.tests.upgradeTests.BasicSetup fails with 10.3.1.1 with the following stack trace:
      1) noConnectionAfterHardUpgrade(org.apache.derbyTesting.functionTests.tests.upgradeTests.BasicSetup)junit.framework.ComparisonFailure: Unexpected SQL state. expected:<...P> but was:<...N>
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:562)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:597)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertSQLState(BaseJDBCTestCase.java:611)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.BasicSetup.noConnectionAfterHardUpgrade(BasicSetup.java:144)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:88)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      Caused by: java.sql.SQLException: Database at C:\derbyt\103\tst\upgr10311\system\singleUse\oneuse0 has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.3.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
      at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
      at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
      at org.apache.derbyTesting.junit.DataSourceConnector.openConnection(DataSourceConnector.java:54)
      at org.apache.derbyTesting.junit.TestConfiguration.openDefaultConnection(TestConfiguration.java:1006)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.openDefaultConnection(BaseJDBCTestCase.java:255)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.getConnection(BaseJDBCTestCase.java:92)
      at org.apache.derbyTesting.functionTests.tests.upgradeTests.BasicSetup.noConnectionAfterHardUpgrade(BasicSetup.java:140)
      ... 64 more

      I'm investigating, but I strongly suspect this is more likely a test issue...

        Activity

        Gavin made changes -
        Workflow jira [ 12408080 ] Default workflow, editable Closed status [ 12799443 ]
        Dag H. Wanvik made changes -
        Issue Type Test [ 6 ] Bug [ 1 ]
        Myrna van Lunteren made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Myrna van Lunteren [ myrna ]
        Myrna van Lunteren made changes -
        Field Original Value New Value
        Fix Version/s 10.3.1.2 [ 12312566 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Myrna van Lunteren added a comment -

        fixed by accepting both errors XSLAN and XSLAP - revision 555441 in trunk and 555442 in 10.3.
        If someone figures out how to check on the beta - a mechanism that works even with JSR169, i.e. not using DriverManager (so, not using DriverVersion) - it can be done as part of a separate JIRA.

        Show
        Myrna van Lunteren added a comment - fixed by accepting both errors XSLAN and XSLAP - revision 555441 in trunk and 555442 in 10.3. If someone figures out how to check on the beta - a mechanism that works even with JSR169, i.e. not using DriverManager (so, not using DriverVersion) - it can be done as part of a separate JIRA.
        Hide
        Myrna van Lunteren added a comment -

        Is it ok to just get the SQLState & if it's either XSLAP or XSLAN, it's ok?

        Or do we need to get the version of the current jar and if it's a beta, check with XSLAP, if not, check with XSLAN?
        How would that best be achieved if we can't get a connection (so we can't use databasemetadata.getDatabaseProductVersion?

        Show
        Myrna van Lunteren added a comment - Is it ok to just get the SQLState & if it's either XSLAP or XSLAN, it's ok? Or do we need to get the version of the current jar and if it's a beta, check with XSLAP, if not, check with XSLAN? How would that best be achieved if we can't get a connection (so we can't use databasemetadata.getDatabaseProductVersion?
        Hide
        Myrna van Lunteren added a comment -

        The test shows this:
        // Other SQL states might be valid,
        // once the beta flag is dropped.
        assertSQLState("XSLAP", e);

        Looks like XSLAN is also valid if beta=false.

        Show
        Myrna van Lunteren added a comment - The test shows this: // Other SQL states might be valid, // once the beta flag is dropped. assertSQLState("XSLAP", e); Looks like XSLAN is also valid if beta=false.
        Myrna van Lunteren created issue -

          People

          • Assignee:
            Myrna van Lunteren
            Reporter:
            Myrna van Lunteren
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development