ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-473

cleanup junit tests to eliminate false positives due to "socket reuse" and failure to close client

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: tests
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The junit tests will occasionally fail on hudson due to a few problems:

      1) socket in use - sometimes the code/testcode will fail to close a socket, either that or tcp wait
      kicks in and the kernel holds onto the socket, either way subsequent tests that use this same
      port will fail

      2) sometimes the tests fail to close clients, this results in clients attempting to re-connect to
      the server started as part of a subsequent test (the timeout is very long). this causes a few
      problems, typically extra load on the server or more likely unusual changes to the server that the
      next test(s) don't expect. also causes problems when trying to debug the test as the old clients
      spew messages into the log.

      we see this on hudson, occasionally failures. We also saw this when working on ZOOKEEPER-397, the testng
      port. testng does not support "fork mode" for running the tests. as a result all the tests (all) run in a single
      vm instance, start to finish. so this problem is exacerbated significantly in that case. this patch only
      fixes the problem in junit btw, it does not move to testng

      1. ZOOKEEPER-473.patch
        110 kB
        Patrick Hunt
      2. ZOOKEEPER-473.patch
        108 kB
        Patrick Hunt

        Issue Links

          Activity

          Patrick Hunt made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mahadev konar made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Resolution Fixed [ 1 ]
          Patrick Hunt made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Patrick Hunt made changes -
          Attachment ZOOKEEPER-473.patch [ 12413716 ]
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Patrick Hunt made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Patrick Hunt made changes -
          Attachment ZOOKEEPER-473.patch [ 12413578 ]
          Patrick Hunt made changes -
          Field Original Value New Value
          Link This issue relates to ZOOKEEPER-460 [ ZOOKEEPER-460 ]
          Patrick Hunt created issue -

            People

            • Assignee:
              Patrick Hunt
              Reporter:
              Patrick Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development