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

Authorization decorators don't null out connections when done

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.9.1.0
    • 10.9.1.0
    • Test
    • None

    Description

      Some decorators used to test authorization don't close and null out references to Connection objects when they have completed. Since these tests often create/boot single-use databases, and the Connection objects have references to the database instance and, directly or indirectly, many of its modules, this prevents much garbage from being removed from the heap after the tests have completed and shut down their single-use databases. We should close the default connection and clear the reference to it when tearing down these decorators, so the space is released for subsequent tests to use.

      This problem affects decorators returned by the following methods:

      DatabasePropertyTestSetup.builtinAuthenticationNoTeardown()
      TestConfiguration.sqlAuthorizationDecorator()
      TestConfiguration.sqlAuthorizationDecoratorSingleUse()

      These methods return modified versions of DatabasePropertyTestSetup where the tearDown() method is a no-op.

      Attachments

        1. d5705-1a.diff
          4 kB
          Knut Anders Hatlen

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: