Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2054 Fix Kafka transient unit test failures
  3. KAFKA-2558

ServerShutdownTest is failing intermittently

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0.0
    • Component/s: unit tests
    • Labels:
      None

      Description

      The test cases there fail because tests are leaking resources into others. For this particular case I noticed that the test cases are checking if all threads are being shut down and they are finding threads created by other tests in the same jvm instance.

      To verify this, I added a couple of log messages to print the thread id when the thread starts and when the thread is interrupted. I also interrupt the offending thread in the test case to force it to print its id. Here is one such output:

      $ grep 1572 build/test-results/*.xml
      build/test-results/TEST-kafka.controller.ControllerFailoverTest.xml:[2015-09-16 15:03:42,398] INFO [Controller-0-to-broker-1-send-thread], Starting Controller-0-to-broker-1-send-thread 1572 (kafka.controller.RequestSendThread:68)
      build/test-results/TEST-kafka.server.ServerShutdownTest.xml:[2015-09-16 15:06:33,334] INFO [Controller-0-to-broker-1-send-thread], Got interrupted: Controller-0-to-broker-1-send-thread 1572 (kafka.controller.RequestSendThread:68)
      

      The number 1572 is the thread id.

        Attachments

          Activity

            People

            • Assignee:
              fpj Flavio Paiva Junqueira
              Reporter:
              fpj Flavio Paiva Junqueira
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: