Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: ha, test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      TestZKFailoverController#testGracefulFailoverMultipleZKfcs uses fixed time sleep before assertions. This may fail sometimes though 10 seconds are generally long enough. I think we can use GenericTestUtils.waitFor() to retry the assertions. Meanwhile, it usually does not need 10 seconds to reach the condition (<1s in my laptop). Removing the 10s sleep will also make the UT run faster.

      This is also true to TestZKFailoverController#testGracefulFailover.

      1. HDFS-10985-branch-2.8.001.patch
        2 kB
        Mingliang Liu
      2. HDFS-10985.001.patch
        3 kB
        Mingliang Liu
      3. HDFS-10985.000.patch
        2 kB
        Mingliang Liu

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10582 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10582/)
        HDFS-10985. o.a.h.ha.TestZKFailoverController should not use fixed time (liuml07: rev c874fa914dfbf07d1731f5e87398607366675879)

        • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestZKFailoverController.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10582 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10582/ ) HDFS-10985 . o.a.h.ha.TestZKFailoverController should not use fixed time (liuml07: rev c874fa914dfbf07d1731f5e87398607366675879) (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestZKFailoverController.java
        Hide
        liuml07 Mingliang Liu added a comment -

        Committed to trunk through branch-2.8. Thanks Steve Loughran for review.

        Show
        liuml07 Mingliang Liu added a comment - Committed to trunk through branch-2.8 . Thanks Steve Loughran for review.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 20s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 9m 9s branch-2.8 passed
        +1 compile 7m 10s branch-2.8 passed with JDK v1.8.0_101
        +1 compile 7m 23s branch-2.8 passed with JDK v1.7.0_111
        +1 checkstyle 0m 22s branch-2.8 passed
        +1 mvnsite 1m 2s branch-2.8 passed
        +1 mvneclipse 0m 15s branch-2.8 passed
        +1 findbugs 1m 43s branch-2.8 passed
        +1 javadoc 0m 52s branch-2.8 passed with JDK v1.8.0_101
        +1 javadoc 1m 2s branch-2.8 passed with JDK v1.7.0_111
        +1 mvninstall 0m 45s the patch passed
        +1 compile 7m 5s the patch passed with JDK v1.8.0_101
        +1 javac 7m 5s the patch passed
        +1 compile 7m 37s the patch passed with JDK v1.7.0_111
        +1 javac 7m 37s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 1m 2s the patch passed
        +1 mvneclipse 0m 15s the patch passed
        -1 whitespace 0m 0s The patch has 47 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
        +1 findbugs 2m 0s the patch passed
        +1 javadoc 0m 49s the patch passed with JDK v1.8.0_101
        +1 javadoc 1m 2s the patch passed with JDK v1.7.0_111
        +1 unit 8m 22s hadoop-common in the patch passed with JDK v1.7.0_111.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        68m 41s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:5af2af1
        JIRA Issue HDFS-10985
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832516/HDFS-10985-branch-2.8.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 897f5c503ae1 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision branch-2.8 / 583283d
        Default Java 1.7.0_111
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111
        findbugs v3.0.0
        whitespace https://builds.apache.org/job/PreCommit-HDFS-Build/17085/artifact/patchprocess/whitespace-eol.txt
        JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17085/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17085/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 20s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 9m 9s branch-2.8 passed +1 compile 7m 10s branch-2.8 passed with JDK v1.8.0_101 +1 compile 7m 23s branch-2.8 passed with JDK v1.7.0_111 +1 checkstyle 0m 22s branch-2.8 passed +1 mvnsite 1m 2s branch-2.8 passed +1 mvneclipse 0m 15s branch-2.8 passed +1 findbugs 1m 43s branch-2.8 passed +1 javadoc 0m 52s branch-2.8 passed with JDK v1.8.0_101 +1 javadoc 1m 2s branch-2.8 passed with JDK v1.7.0_111 +1 mvninstall 0m 45s the patch passed +1 compile 7m 5s the patch passed with JDK v1.8.0_101 +1 javac 7m 5s the patch passed +1 compile 7m 37s the patch passed with JDK v1.7.0_111 +1 javac 7m 37s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 1m 2s the patch passed +1 mvneclipse 0m 15s the patch passed -1 whitespace 0m 0s The patch has 47 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply +1 findbugs 2m 0s the patch passed +1 javadoc 0m 49s the patch passed with JDK v1.8.0_101 +1 javadoc 1m 2s the patch passed with JDK v1.7.0_111 +1 unit 8m 22s hadoop-common in the patch passed with JDK v1.7.0_111. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 68m 41s Subsystem Report/Notes Docker Image:yetus/hadoop:5af2af1 JIRA Issue HDFS-10985 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832516/HDFS-10985-branch-2.8.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 897f5c503ae1 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2.8 / 583283d Default Java 1.7.0_111 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_101 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_111 findbugs v3.0.0 whitespace https://builds.apache.org/job/PreCommit-HDFS-Build/17085/artifact/patchprocess/whitespace-eol.txt JDK v1.7.0_111 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17085/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17085/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        +1

        Show
        stevel@apache.org Steve Loughran added a comment - +1
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 19s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 45s trunk passed
        +1 compile 7m 43s trunk passed
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 1m 19s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 39s trunk passed
        +1 javadoc 0m 45s trunk passed
        +1 mvninstall 0m 40s the patch passed
        +1 compile 7m 24s the patch passed
        +1 javac 7m 24s the patch passed
        +1 checkstyle 0m 22s the patch passed
        +1 mvnsite 0m 57s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 37s the patch passed
        +1 javadoc 0m 41s the patch passed
        +1 unit 7m 32s hadoop-common in the patch passed.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        40m 42s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10985
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832511/HDFS-10985.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 9e14d3db9866 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / cef61d5
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17082/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17082/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 19s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 45s trunk passed +1 compile 7m 43s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 1m 19s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 39s trunk passed +1 javadoc 0m 45s trunk passed +1 mvninstall 0m 40s the patch passed +1 compile 7m 24s the patch passed +1 javac 7m 24s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 0m 57s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 37s the patch passed +1 javadoc 0m 41s the patch passed +1 unit 7m 32s hadoop-common in the patch passed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 40m 42s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10985 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832511/HDFS-10985.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 9e14d3db9866 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / cef61d5 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17082/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17082/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        Thank you Steve Loughran for your review. Can you also have a look at the v1 patch that addressed one more place in the test?

        Show
        liuml07 Mingliang Liu added a comment - Thank you Steve Loughran for your review. Can you also have a look at the v1 patch that addressed one more place in the test?
        Hide
        liuml07 Mingliang Liu added a comment -

        The v1 patch also fixed the testGracefulFailover test case.

        Show
        liuml07 Mingliang Liu added a comment - The v1 patch also fixed the testGracefulFailover test case.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        makes a lot of sense; lets put it in and see if the itermittent jenkins failures go away. If not, we can tune it further

        +1

        Patch doesn't apply to branch-2.8 BTW; I'll leave you to sort that out before you commit it there

        Show
        stevel@apache.org Steve Loughran added a comment - makes a lot of sense; lets put it in and see if the itermittent jenkins failures go away. If not, we can tune it further +1 Patch doesn't apply to branch-2.8 BTW; I'll leave you to sort that out before you commit it there
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 12s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 6m 59s trunk passed
        +1 compile 6m 55s trunk passed
        +1 checkstyle 0m 22s trunk passed
        +1 mvnsite 0m 57s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 16s trunk passed
        +1 javadoc 0m 42s trunk passed
        +1 mvninstall 0m 40s the patch passed
        +1 compile 8m 10s the patch passed
        +1 javac 8m 10s the patch passed
        +1 checkstyle 0m 25s the patch passed
        +1 mvnsite 1m 0s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 45s the patch passed
        +1 javadoc 0m 45s the patch passed
        +1 unit 9m 7s hadoop-common in the patch passed.
        +1 asflicense 0m 22s The patch does not generate ASF License warnings.
        40m 47s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10985
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832223/HDFS-10985.000.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 0f6af6d1bfdb 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / e57fa81
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17063/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17063/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 12s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 59s trunk passed +1 compile 6m 55s trunk passed +1 checkstyle 0m 22s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 16s trunk passed +1 javadoc 0m 42s trunk passed +1 mvninstall 0m 40s the patch passed +1 compile 8m 10s the patch passed +1 javac 8m 10s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 1m 0s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 45s the patch passed +1 javadoc 0m 45s the patch passed +1 unit 9m 7s hadoop-common in the patch passed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 40m 47s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10985 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12832223/HDFS-10985.000.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 0f6af6d1bfdb 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / e57fa81 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17063/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17063/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        Steve Loughran and Aaron T. Myers, does this makes sense to you?

        Show
        liuml07 Mingliang Liu added a comment - Steve Loughran and Aaron T. Myers , does this makes sense to you?

          People

          • Assignee:
            liuml07 Mingliang Liu
            Reporter:
            liuml07 Mingliang Liu
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development