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_2.patch
        1 kB
        Patrick Hunt
      2. ZOOKEEPER-1103_branch_3_3_try2.patch
        1 kB
        Patrick Hunt
      3. ZOOKEEPER-1103_branch_3_3.patch
        1 kB
        Patrick Hunt
      4. ZOOKEEPER-1103.patch
        1 kB
        Eugene Koontz

        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 ]
          Hide
          Patrick Hunt added a comment -

          This should be fixed in both branch 3.3 and trunk.

          Show
          Patrick Hunt added a comment - This should be fixed in both branch 3.3 and trunk.
          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 ]
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12483355/ZOOKEEPER-1103.patch
          against trunk revision 1138100.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 5 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483355/ZOOKEEPER-1103.patch against trunk revision 1138100. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/342//console This message is automatically generated.
          Hide
          Patrick Hunt added a comment -

          Minor tweak to compile against branch 3.3.

          Show
          Patrick Hunt added a comment - Minor tweak to compile against branch 3.3.
          Patrick Hunt made changes -
          Attachment ZOOKEEPER-1103_branch_3_3.patch [ 12483366 ]
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12483366/ZOOKEEPER-1103_branch_3_3.patch
          against trunk revision 1138213.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 5 new or modified tests.

          -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/343//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483366/ZOOKEEPER-1103_branch_3_3.patch against trunk revision 1138213. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/343//console This message is automatically generated.
          Hide
          Patrick Hunt added a comment -

          disregard this last failure (only runs patches against trunk, which is specifically for branch 3.3)

          Show
          Patrick Hunt added a comment - disregard this last failure (only runs patches against trunk, which is specifically for branch 3.3)
          Hide
          Patrick Hunt added a comment -

          Committed to trunk and branch 3.3, thanks Eugene!

          Show
          Patrick Hunt added a comment - Committed to trunk and branch 3.3, thanks Eugene!
          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 ]
          Hide
          Patrick Hunt added a comment -

          My bad, there's an issue with this change (didn't show up on my testing but I can see why on jenkins). I'll fix this.

          Show
          Patrick Hunt added a comment - My bad, there's an issue with this change (didn't show up on my testing but I can see why on jenkins). I'll fix this.
          Patrick Hunt made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Patrick Hunt added a comment -

          Updated to check success/fail correctly. (sorry for missing that!)

          Show
          Patrick Hunt added a comment - Updated to check success/fail correctly. (sorry for missing that!)
          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 ]
          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #1221 (See https://builds.apache.org/job/ZooKeeper-trunk/1221/)
          Fixed a problem introduced by the first patch for ZOOKEEPER-1103 (phunt)

          phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1138595
          Files :

          • /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java
          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #1221 (See https://builds.apache.org/job/ZooKeeper-trunk/1221/ ) Fixed a problem introduced by the first patch for ZOOKEEPER-1103 (phunt) phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1138595 Files : /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java
          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