ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1103

In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4.0
    • Fix Version/s: 3.3.4, 3.4.0
    • Component/s: tests
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Patrick Hunt writes:

      "Such uses of sleep [used in testFollowersStartAfterLeader] are just asking for trouble. Take a look at the use
      of sleep in testSessionMove in the same class for a better way to do
      this. I had gone through all the tests a while back, replacing all the
      "sleep" with something like this testSessionMove pattern (retry
      with a max limit that's very long). During reviews we should look for
      anti-patterns like this and address them before commit."

      So, modify testFollowersStartAfterLeaders to use the same retrying approach that testSessionMove uses.

      1. ZOOKEEPER-1103.patch
        1 kB
        Eugene Koontz
      2. ZOOKEEPER-1103_branch_3_3.patch
        1 kB
        Patrick Hunt
      3. ZOOKEEPER-1103_2.patch
        1 kB
        Patrick Hunt
      4. ZOOKEEPER-1103_branch_3_3_try2.patch
        1 kB
        Patrick Hunt

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Eugene Koontz
              Reporter:
              Eugene Koontz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development