Derby
  1. Derby
  2. DERBY-6039

Intermittent failure in LangProcedureTest.testDynamicResultSets: Table/View 'T1' does not exist.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: Test
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      Seen in the nightly testing: http://download.java.net/javadesktop/derby/javadb-5570895-report/javadb-5570895-3573406-details.html

      testDynamicResultSets() needs the table T1, which is created by testSqlProcedures(). If testDynamicResultSets() happens to run before testSqlProcedures(), it will fail because T1 does not exist.

      1. d6039-2a.diff
        2 kB
        Knut Anders Hatlen
      2. d6039-1a.diff
        2 kB
        Knut Anders Hatlen

        Activity

        Knut Anders Hatlen created issue -
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch makes testSqlProcedures() drop T1 when it's done, and testDynamicResultSets() recreates it. The test now passes regardless of how the two test cases are ordered.

        Show
        Knut Anders Hatlen added a comment - The attached patch makes testSqlProcedures() drop T1 when it's done, and testDynamicResultSets() recreates it. The test now passes regardless of how the two test cases are ordered.
        Knut Anders Hatlen made changes -
        Attachment d6039-1a.diff [ 12564159 ]
        Knut Anders Hatlen made changes -
        Issue & fix info Patch Available [ 10102 ]
        Hide
        Dag H. Wanvik added a comment -

        Thanks, Knut. Looks good. +1

        Do you think there could be other ordering bugs in this test? I presume it hasn't been run much with Java 7 yet. Maybe we should considering fixing the execution order of the fixtures?

        Show
        Dag H. Wanvik added a comment - Thanks, Knut. Looks good. +1 Do you think there could be other ordering bugs in this test? I presume it hasn't been run much with Java 7 yet. Maybe we should considering fixing the execution order of the fixtures?
        Hide
        Knut Anders Hatlen added a comment -

        Thanks for looking at the patch, Dag. Committed revision 1431948.

        I have no reason to believe there are other ordering bugs, so I don't think we need to change it to run with fixed execution order now. However, I added some code to the tearDown() method to print the names of all tables, procedures and function that live in the APP schema after each test case has completed, and found that testDuplicates() leaves a procedure called PROCDUP and testDynamicResultSets() leaves one called INSERTCAUSINGROLLBACK. If other test cases depend on the existence of those procedures, ordering may affect the result. I don't know if there are such dependencies, but I think we should make the two test cases clean up after themselves in any case. I'll post a follow-up patch.

        Show
        Knut Anders Hatlen added a comment - Thanks for looking at the patch, Dag. Committed revision 1431948. I have no reason to believe there are other ordering bugs, so I don't think we need to change it to run with fixed execution order now. However, I added some code to the tearDown() method to print the names of all tables, procedures and function that live in the APP schema after each test case has completed, and found that testDuplicates() leaves a procedure called PROCDUP and testDynamicResultSets() leaves one called INSERTCAUSINGROLLBACK. If other test cases depend on the existence of those procedures, ordering may affect the result. I don't know if there are such dependencies, but I think we should make the two test cases clean up after themselves in any case. I'll post a follow-up patch.
        Hide
        Knut Anders Hatlen added a comment -

        There was also a schema WAY created by testDynamicResultSets() and not dropped.

        The attached patch (d6039-2a.diff) makes the test cases drop all procedures, functions and schemas they have created.

        Committed revision 1431961.

        Show
        Knut Anders Hatlen added a comment - There was also a schema WAY created by testDynamicResultSets() and not dropped. The attached patch (d6039-2a.diff) makes the test cases drop all procedures, functions and schemas they have created. Committed revision 1431961.
        Knut Anders Hatlen made changes -
        Attachment d6039-2a.diff [ 12564389 ]
        Knut Anders Hatlen made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Hide
        Dag H. Wanvik added a comment -

        Thanks for cleaning this up, Knut! Hopefully this test will now run cleanly going forward

        Show
        Dag H. Wanvik added a comment - Thanks for cleaning this up, Knut! Hopefully this test will now run cleanly going forward
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12745348 ] Default workflow, editable Closed status [ 12802228 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        25m 11s 1 Knut Anders Hatlen 10/Jan/13 13:16
        In Progress In Progress Resolved Resolved
        20h 38m 1 Knut Anders Hatlen 11/Jan/13 09:55
        Resolved Resolved Closed Closed
        156d 23h 32m 1 Knut Anders Hatlen 17/Jun/13 10:27

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development