Jetspeed 2
  1. Jetspeed 2
  2. JS2-1014

Unit tests fail in Portals Components using JDK6

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1
    • Component/s: Components Core, Testing
    • Labels:
      None
    • Environment:
      J2 2.2 Trunk
      JDK6/Linux/x86_64

      Description

      Portals Components unit tests fail to execute using JDK 6 with various error messages indicating DB connection pool is closed.

        Activity

        Hide
        Randy Watler added a comment -

        This problem turned out to be related to test order and not JDK6 per se. OJB internals are
        based on static state and running multiple tests w/o forking lead to connections and their
        pools to be reused from test to test. When a test ran first that did not allocate all connections
        possible, subsequent tests attempted to get new connections from connection pools that
        belonged to prior tests which were by now closed. These DB connection attempts failed.

        Fix involves static tracking of OBJ specific connection manager implementation instances and
        resetting their internal state on startup. This code does nothing on the initial invocation,
        (for the first test and production instances), but serves to clear the statically held OJB
        state between test cases.

        Commit SVN revision: 775413

        Show
        Randy Watler added a comment - This problem turned out to be related to test order and not JDK6 per se. OJB internals are based on static state and running multiple tests w/o forking lead to connections and their pools to be reused from test to test. When a test ran first that did not allocate all connections possible, subsequent tests attempted to get new connections from connection pools that belonged to prior tests which were by now closed. These DB connection attempts failed. Fix involves static tracking of OBJ specific connection manager implementation instances and resetting their internal state on startup. This code does nothing on the initial invocation, (for the first test and production instances), but serves to clear the statically held OJB state between test cases. Commit SVN revision: 775413
        Hide
        Randy Watler added a comment -

        Backing out fix: judged as high risk for 2.2.0

        Show
        Randy Watler added a comment - Backing out fix: judged as high risk for 2.2.0
        Hide
        Randy Watler added a comment -

        patch available for later application

        Show
        Randy Watler added a comment - patch available for later application
        Hide
        Randy Watler added a comment -

        SVN commit: 785900

        Show
        Randy Watler added a comment - SVN commit: 785900

          People

          • Assignee:
            Randy Watler
            Reporter:
            Randy Watler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development