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

        Randy Watler created issue -
        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
        Randy Watler made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.0 [ 12312318 ]
        Resolution Fixed [ 1 ]
        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
        Randy Watler made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Randy Watler made changes -
        Fix Version/s 2.2.1 [ 12313443 ]
        Fix Version/s 2.2.0 [ 12312318 ]
        Hide
        Randy Watler added a comment -

        patch available for later application

        Show
        Randy Watler added a comment - patch available for later application
        Randy Watler made changes -
        Attachment j2-test-ojb-connection-management.patch [ 12408331 ]
        Randy Watler made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        Hide
        Randy Watler added a comment -

        SVN commit: 785900

        Show
        Randy Watler added a comment - SVN commit: 785900
        Randy Watler made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ate Douma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development