Derby
  1. Derby
  2. DERBY-5708

simpleThread test doesn't release connection

    Details

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

      Description

      The simpleThread test, which is run by LangHarnessJavaTest, stores its connection in a static field. It doesn't close the connection, or clear the static field, before returning. So the connection is left open for the rest of the test run (potentially for the entire duration of suites.All).

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

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1m 24s 1 Knut Anders Hatlen 24/Apr/12 12:15
        In Progress In Progress Closed Closed
        23h 5m 1 Knut Anders Hatlen 25/Apr/12 11:20
        Gavin made changes -
        Workflow jira [ 12663807 ] Default workflow, editable Closed status [ 12796681 ]
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1330197.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1330197.
        Knut Anders Hatlen made changes -
        Issue & fix info Patch Available [ 10102 ]
        Knut Anders Hatlen made changes -
        Attachment d5708-1a.diff [ 12523962 ]
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch makes simpleTest close and forget the connection before returning.

        It also fixes another problem with the test: The test starts four threads that use a shared connection to perform queries. However, it returns just after starting the tests, and doesn't wait to see if the threads succeeded. The patch makes it wait until the threads have completed before returning. (This part of the patch was needed to prevent the new cleanup code to close and null out the connection before the threads were done with it.)

        The test is still a bit strange, though. For example, it ignores exceptions in the threads. Only wrong results cause a test failure.

        Show
        Knut Anders Hatlen added a comment - The attached patch makes simpleTest close and forget the connection before returning. It also fixes another problem with the test: The test starts four threads that use a shared connection to perform queries. However, it returns just after starting the tests, and doesn't wait to see if the threads succeeded. The patch makes it wait until the threads have completed before returning. (This part of the patch was needed to prevent the new cleanup code to close and null out the connection before the threads were done with it.) The test is still a bit strange, though. For example, it ignores exceptions in the threads. Only wrong results cause a test failure.
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        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