Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-1045

Execute tests in different JVM processes

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0
    • Component/s: None
    • Labels:
      None

      Description

      The current Maven Surefire configuration is using:

      <forkMode>always</forkMode>
      

      This is a deprecated config and apparently it's not creating new processes for each test as intended.

      Currently the tests are leaking a big number of files and threads due to several reasons:

      • Tests that instantiate bookies and call shutdown() without calling start() before are creating and initializing the ledger storage but not closing it, leaking threads and several fds
      • ZooKeeperClient sometimes doesn't shutdown the zk handle if the test completes too quickly, leaking sockets.
      • Several tests are passing bad config, so the bookie/client start gets exception (on purpose) and then doesn't clean up some partial objects.
      • ...

      That make running the test suite to be dependent on ulimit of the machine.

      Until we can fix (almost) all the test to do proper cleanup, we should make maven to run tests in separated processes.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mmerli Matteo Merli
                Reporter:
                mmerli Matteo Merli
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: