Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1390

TestUtils.waitUntilLeaderIsElectedOrChanged may wait longer than it needs

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: 0.8.2.0
    • Component/s: None
    • Labels:
      None

      Description

      The way that waitUntilLeaderIsElectedOrChanged() works is to wait for a ZK callback on leader change. However, if the leader is already elected (and won't change) at the time waitUntilLeaderIsElectedOrChanged() is called, this function will wait for the full timeout, which is unnecessary.

        Attachments

          Activity

            People

            • Assignee:
              junrao Jun Rao
              Reporter:
              junrao Jun Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: