Derby
  1. Derby
  2. DERBY-4523

store.AccessTest fails on phoneME

    Details

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

      Description

      There are 21 errors in AccessTest on phoneME, see http://dbtg.foundry.sun.com/derby/test/Daily/javaME/testing/testlog/ubuntu/901774-suitesAll_diff.txt.

      1) testCaseCS4595B_NonUniqueIndex(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      2) testCaseCS4595A_NonUniqueIndex(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      3) testCS4595B_PrimaryKey(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      4) testCS4595A_PrimaryKey(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      5) testCS4595B_UniqueIndex(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      6) testCS4595A_UniqueIndex(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      7) testCS3149(org.apache.derbyTesting.functionTests.tests.store.AccessTest)java.sql.SQLException: Table/View 'FOO' already exists in Schema 'APP'.
      .
      .
      .

      1. phoneme.diff
        1 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12489073 ] Default workflow, editable Closed status [ 12800941 ]
          Rick Hillegas made changes -
          Link This issue is related to DERBY-5119 [ DERBY-5119 ]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Knut Anders Hatlen added a comment -

          The phoneME tests ran cleanly in the nightlies. Closing the issue.

          Show
          Knut Anders Hatlen added a comment - The phoneME tests ran cleanly in the nightlies. Closing the issue.
          Knut Anders Hatlen made changes -
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 902366.

          I will keep the issue open until we see that the nightly regression tests on phoneME pass.

          Show
          Knut Anders Hatlen added a comment - Committed revision 902366. I will keep the issue open until we see that the nightly regression tests on phoneME pass.
          Knut Anders Hatlen made changes -
          Attachment phoneme.diff [ 12431208 ]
          Hide
          Knut Anders Hatlen added a comment -

          Many of the test cases create tables with the same names. Most of the test cases also drop them before they finish, but some of them don't. This problem is only seen when the test cases are run in a particular order, with a test case that don't drop the tables it created before test cases that use the same table name. On phoneME, the test cases are run in the opposite order of how they appear in the source file. I haven't run the test on phoneME myself, but if I change suite() and force reversed order, I see the same errors on Java SE.

          The attached patch adds DROP TABLE to those test cases missing it. Also, one of the test cases called rollback() at the end, but it had no effect because it was running with auto-commit, so I turned off auto-commit in that test case. That test case also dropped the function PADSTRING right before rollback(), which looked unnecessary, so I removed it (see also DERBY-4524 about clean-up of PADSTRING).

          Perhaps it would be better to move all the dropping of tables and other cleanup into a tearDown() method. But since doing the cleanup inside the test cases is the established pattern in this test, I'll just do this simple change to make the test internally consistent for now. If someone wants to write a proper tearDown(), feel free to open separate issue for that.

          Show
          Knut Anders Hatlen added a comment - Many of the test cases create tables with the same names. Most of the test cases also drop them before they finish, but some of them don't. This problem is only seen when the test cases are run in a particular order, with a test case that don't drop the tables it created before test cases that use the same table name. On phoneME, the test cases are run in the opposite order of how they appear in the source file. I haven't run the test on phoneME myself, but if I change suite() and force reversed order, I see the same errors on Java SE. The attached patch adds DROP TABLE to those test cases missing it. Also, one of the test cases called rollback() at the end, but it had no effect because it was running with auto-commit, so I turned off auto-commit in that test case. That test case also dropped the function PADSTRING right before rollback(), which looked unnecessary, so I removed it (see also DERBY-4524 about clean-up of PADSTRING). Perhaps it would be better to move all the dropping of tables and other cleanup into a tearDown() method. But since doing the cleanup inside the test cases is the established pattern in this test, I'll just do this simple change to make the test internally consistent for now. If someone wants to write a proper tearDown(), feel free to open separate issue for that.
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development