Derby
  1. Derby
  2. DERBY-5711

NullsTest doesn't call super.tearDown()

    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

      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
          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
          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
          Kristian Waagan added a comment -

          Sounds like the right thing to do, +1.

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

          Thanks, Kristian.
          Committed revision 1330120.

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

            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