ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1104

CLONE - 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.4.0
    • Fix Version/s: 3.4.0
    • Component/s: tests
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Contains improvement to original patch (remove unneeded boolean variable).

      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.

        Issue Links

          Activity

          sreekanth created issue -
          sreekanth made changes -
          Field Original Value New Value
          Link This issue is a clone of ZOOKEEPER-1103 [ ZOOKEEPER-1103 ]
          Hide
          Eugene Koontz added a comment -

          Hi, an earlier version of the patch for this issue is now in trunk since:

          I am adding another, smaller patch that syncs trunk with the modifications of this patch (removing the unneeded "boolean success" variable).

          Show
          Eugene Koontz added a comment - Hi, an earlier version of the patch for this issue is now in trunk since: I am adding another, smaller patch that syncs trunk with the modifications of this patch (removing the unneeded "boolean success" variable).
          Hide
          Eugene Koontz added a comment -

          sorry should have read "since June 21-June 22"

          {{
          commit 9619bd31d5b191fdb7d622d2bb84fac92ab1111c
          Author: Patrick D. Hunt <phunt@apache.org>
          Date: Wed Jun 22 19:35:55 2011 +0000

          Fixed a problem introduced by the first patch for ZOOKEEPER-1103 (phunt)

          git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1138595 13f79535-47bb-0310-9956-ffa450edef68

          commit 77992edd8abc6ffd759d60266e55fd3b388b7d3a
          Author: Patrick D. Hunt <phunt@apache.org>
          Date: Tue Jun 21 22:19:04 2011 +0000

          ZOOKEEPER-1103. In QuorumTest, use the same "for ( .. try

          { break }

          catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove. (Eugene Koontz v

          git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1138213 13f79535-47bb-0310-9956-ffa450edef68
          }}

          Show
          Eugene Koontz added a comment - sorry should have read "since June 21-June 22" {{ commit 9619bd31d5b191fdb7d622d2bb84fac92ab1111c Author: Patrick D. Hunt <phunt@apache.org> Date: Wed Jun 22 19:35:55 2011 +0000 Fixed a problem introduced by the first patch for ZOOKEEPER-1103 (phunt) git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1138595 13f79535-47bb-0310-9956-ffa450edef68 commit 77992edd8abc6ffd759d60266e55fd3b388b7d3a Author: Patrick D. Hunt <phunt@apache.org> Date: Tue Jun 21 22:19:04 2011 +0000 ZOOKEEPER-1103 . In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove. (Eugene Koontz v git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1138213 13f79535-47bb-0310-9956-ffa450edef68 }}
          Eugene Koontz made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note Contains improvement to original patch (remove unneeded boolean variable).
          Eugene Koontz made changes -
          Attachment ZOOKEEPER-1104.patch [ 12487200 ]
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12487200/ZOOKEEPER-1104.patch
          against trunk revision 1148553.

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

          +1 tests included. The patch appears to include 4 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 generated 26 release audit warnings (more than the trunk's current 24 warnings).

          -1 core tests. The patch failed core unit tests.

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

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//testReport/
          Release audit warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//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/12487200/ZOOKEEPER-1104.patch against trunk revision 1148553. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 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 generated 26 release audit warnings (more than the trunk's current 24 warnings). -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/404//console This message is automatically generated.
          Mark Thomas made changes -
          Comment [ f ]
          Hide
          Hadoop QA added a comment -

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

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

          +1 tests included. The patch appears to include 4 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/449//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/449//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/449//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/12487200/ZOOKEEPER-1104.patch against trunk revision 1152141. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 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/449//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/449//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/449//console This message is automatically generated.
          Hide
          Mahadev konar added a comment -

          Eugene,
          You have a couple of patches attached. 2 of them saying ZOOKEEPER-1103. Is ZOOKEEPER-1104 patch the one to consider for this jira?

          Show
          Mahadev konar added a comment - Eugene, You have a couple of patches attached. 2 of them saying ZOOKEEPER-1103 . Is ZOOKEEPER-1104 patch the one to consider for this jira?
          Hide
          Eugene Koontz added a comment -

          Hi Mahadev, Please use the ZOOKEEPER-1104 one (ZOOKEEPER-1104.patch)
          -Eugene

          Show
          Eugene Koontz added a comment - Hi Mahadev, Please use the ZOOKEEPER-1104 one ( ZOOKEEPER-1104 .patch) -Eugene
          Mahadev konar made changes -
          Fix Version/s 3.3.4 [ 12316276 ]
          Affects Version/s 3.3.3 [ 12315482 ]
          Hide
          Mahadev konar added a comment -

          Eugene, I am assuming the patch is just for trunk. Let me know if it needs to go into 3.3 branch as well.

          Show
          Mahadev konar added a comment - Eugene, I am assuming the patch is just for trunk. Let me know if it needs to go into 3.3 branch as well.
          Hide
          Mahadev konar added a comment -

          I just pushed this to trunk only! Thanks Eugene, do let me know if this needs to go into 3.3 branch.

          Show
          Mahadev konar added a comment - I just pushed this to trunk only! Thanks Eugene, do let me know if this needs to go into 3.3 branch.
          Mahadev konar made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #1266 (See https://builds.apache.org/job/ZooKeeper-trunk/1266/)
          ZOOKEEPER-1104. CLONE - In QuorumTest, use the same "for ( .. try

          { break }

          catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove. (Eugene Koontz via mahadev)

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

          • /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java
          • /zookeeper/trunk/CHANGES.txt
          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #1266 (See https://builds.apache.org/job/ZooKeeper-trunk/1266/ ) ZOOKEEPER-1104 . CLONE - In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove. (Eugene Koontz via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1157690 Files : /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java /zookeeper/trunk/CHANGES.txt
          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development