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

          Eugene Koontz created issue -
          Eugene Koontz made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Eugene Koontz made changes -
          Attachment ZOOKEEPER-1103.patch [ 12483355 ]
          Patrick Hunt made changes -
          Fix Version/s 3.3.4 [ 12316276 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Patrick Hunt made changes -
          Affects Version/s 3.3.3 [ 12315482 ]
          Patrick Hunt made changes -
          Attachment ZOOKEEPER-1103_branch_3_3.patch [ 12483366 ]
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Resolution Fixed [ 1 ]
          sreekanth made changes -
          Link This issue is cloned as ZOOKEEPER-1104 [ ZOOKEEPER-1104 ]
          Patrick Hunt made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Patrick Hunt made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Patrick Hunt made changes -
          Attachment ZOOKEEPER-1103_2.patch [ 12483493 ]
          Attachment ZOOKEEPER-1103_branch_3_3_try2.patch [ 12483494 ]
          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development