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

NullsTest doesn't call super.tearDown()

    Details

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

      Description

      NullsTest has the following tearDown() method:

      public void tearDown() throws SQLException

      { getConnection().setAutoCommit(true); }

      Since it doesn't call super.tearDown(), it doesn't release connections and statements.

      1. d5711-1a.diff
        0.9 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Hide
          knutanders Knut Anders Hatlen added a comment -

          Since the current tearDown() method only calls setAutoCommit(), which is not neccessary since the connection is not going to be used anymore, I've removed the method in the attached patch. Then NullsTest will inherit BaseJDBCTestCase.tearDown() and do the right thing automatically.

          Show
          knutanders Knut Anders Hatlen added a comment - Since the current tearDown() method only calls setAutoCommit(), which is not neccessary since the connection is not going to be used anymore, I've removed the method in the attached patch. Then NullsTest will inherit BaseJDBCTestCase.tearDown() and do the right thing automatically.
          Hide
          kristwaa Kristian Waagan added a comment -

          Sounds like the right thing to do, +1.

          Show
          kristwaa Kristian Waagan added a comment - Sounds like the right thing to do, +1.
          Hide
          knutanders Knut Anders Hatlen added a comment -

          Thanks, Kristian.
          Committed revision 1330120.

          Show
          knutanders Knut Anders Hatlen added a comment - Thanks, Kristian. Committed revision 1330120.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development