Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14669

GenericTestUtils.waitFor should use monotonic time

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha4
    • Fix Version/s: 2.9.0, 3.0.0-beta1
    • Component/s: test
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      GenericTestUtils.waitFor should be calling Time.monotonicNow rather than Time.now. Otherwise if the system clock adjusts during unit testing the timeout period could be incorrect.

      1. HADOOP-14669.001.patch
        1 kB
        Daniel Templeton
      2. HADOOP-14669.002.patch
        1 kB
        Daniel Templeton
      3. HADOOP-14669.003.patch
        0.9 kB
        Daniel Templeton

        Issue Links

          Activity

          Hide
          jlowe Jason Lowe added a comment -

          I suspect there's more than test code that is using the wrong clock. Filed HADOOP-14713 for tracking the task of auditing the code for cases that need to be fixed. We can link the relevant subtask JIRAs there.

          Show
          jlowe Jason Lowe added a comment - I suspect there's more than test code that is using the wrong clock. Filed HADOOP-14713 for tracking the task of auditing the code for cases that need to be fixed. We can link the relevant subtask JIRAs there.
          Hide
          templedf Daniel Templeton added a comment -

          I would bet the test code is riddled with clock time. It certainly wouldn't hurt to take a stab at cleaning that up. Maybe file a newbie JIRA and see if we can get one of the enthusiastic members of the community will pick it up?

          Show
          templedf Daniel Templeton added a comment - I would bet the test code is riddled with clock time. It certainly wouldn't hurt to take a stab at cleaning that up. Maybe file a newbie JIRA and see if we can get one of the enthusiastic members of the community will pick it up?
          Hide
          stevel@apache.org Steve Loughran added a comment -

          this is probably something we (I !) have been doing elsewhere. Should it merit a broader review/fix?

          Show
          stevel@apache.org Steve Loughran added a comment - this is probably something we (I !) have been doing elsewhere. Should it merit a broader review/fix?
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12030 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12030/)
          HADOOP-14669. GenericTestUtils.waitFor should use monotonic time. (jlowe: rev df180259b0cc3660e199e85447c7193bee51751c)

          • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12030 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12030/ ) HADOOP-14669 . GenericTestUtils.waitFor should use monotonic time. (jlowe: rev df180259b0cc3660e199e85447c7193bee51751c) (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java
          Hide
          jlowe Jason Lowe added a comment -

          Thanks, Daniel Templeton! I committed this to trunk and branch-2.

          Show
          jlowe Jason Lowe added a comment - Thanks, Daniel Templeton ! I committed this to trunk and branch-2.
          Hide
          jlowe Jason Lowe added a comment -

          +1 lgtm. Test failures are unrelated. Committing this.

          Show
          jlowe Jason Lowe added a comment - +1 lgtm. Test failures are unrelated. Committing this.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 14s Docker mode activated.
                Prechecks
          +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.
                trunk Compile Tests
          +1 mvninstall 13m 13s trunk passed
          +1 compile 13m 36s trunk passed
          +1 checkstyle 0m 35s trunk passed
          +1 mvnsite 1m 27s trunk passed
          +1 findbugs 1m 22s trunk passed
          +1 javadoc 0m 49s trunk passed
                Patch Compile Tests
          +1 mvninstall 0m 38s the patch passed
          +1 compile 10m 8s the patch passed
          +1 javac 10m 8s the patch passed
          +1 checkstyle 0m 36s the patch passed
          +1 mvnsite 1m 26s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 31s the patch passed
          +1 javadoc 0m 49s the patch passed
                Other Tests
          -1 unit 8m 0s hadoop-common in the patch failed.
          +1 asflicense 0m 34s The patch does not generate ASF License warnings.
          56m 47s



          Reason Tests
          Failed junit tests hadoop.security.TestKDiag
            hadoop.net.TestDNS



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14669
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877917/HADOOP-14669.003.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 5cb2d0d78111 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / daaf530
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/console
          Powered by Apache Yetus 0.6.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 14s Docker mode activated.       Prechecks +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.       trunk Compile Tests +1 mvninstall 13m 13s trunk passed +1 compile 13m 36s trunk passed +1 checkstyle 0m 35s trunk passed +1 mvnsite 1m 27s trunk passed +1 findbugs 1m 22s trunk passed +1 javadoc 0m 49s trunk passed       Patch Compile Tests +1 mvninstall 0m 38s the patch passed +1 compile 10m 8s the patch passed +1 javac 10m 8s the patch passed +1 checkstyle 0m 36s the patch passed +1 mvnsite 1m 26s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 31s the patch passed +1 javadoc 0m 49s the patch passed       Other Tests -1 unit 8m 0s hadoop-common in the patch failed. +1 asflicense 0m 34s The patch does not generate ASF License warnings. 56m 47s Reason Tests Failed junit tests hadoop.security.TestKDiag   hadoop.net.TestDNS Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14669 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877917/HADOOP-14669.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 5cb2d0d78111 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / daaf530 Default Java 1.8.0_131 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12817/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 12s Docker mode activated.
                Prechecks
          +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.
                trunk Compile Tests
          0 mvndep 1m 20s Maven dependency ordering for branch
          +1 mvninstall 13m 15s trunk passed
          +1 compile 13m 33s trunk passed
          +1 checkstyle 1m 56s trunk passed
          +1 mvnsite 2m 1s trunk passed
          +1 findbugs 2m 31s trunk passed
          +1 javadoc 1m 18s trunk passed
                Patch Compile Tests
          0 mvndep 0m 17s Maven dependency ordering for patch
          -1 mvninstall 0m 21s hadoop-yarn-api in the patch failed.
          -1 compile 2m 33s root in the patch failed.
          -1 javac 2m 33s root in the patch failed.
          -0 checkstyle 1m 47s root: The patch generated 15 new + 15 unchanged - 0 fixed = 30 total (was 15)
          -1 mvnsite 0m 25s hadoop-yarn-api in the patch failed.
          +1 whitespace 0m 0s The patch has no whitespace issues.
          -1 findbugs 0m 25s hadoop-yarn-api in the patch failed.
          -1 javadoc 0m 21s hadoop-yarn-api in the patch failed.
                Other Tests
          -1 unit 7m 59s hadoop-common in the patch failed.
          -1 unit 0m 25s hadoop-yarn-api in the patch failed.
          +1 asflicense 0m 25s The patch does not generate ASF License warnings.
          76m 39s



          Reason Tests
          Failed junit tests hadoop.security.TestKDiag



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14669
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877908/HADOOP-14669.003.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux d13a05c65966 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / daaf530
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          mvninstall https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-mvninstall-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt
          compile https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-compile-root.txt
          javac https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-compile-root.txt
          checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/diff-checkstyle-root.txt
          mvnsite https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt
          findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt
          javadoc https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/testReport/
          modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api U: .
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/console
          Powered by Apache Yetus 0.6.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.       Prechecks +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.       trunk Compile Tests 0 mvndep 1m 20s Maven dependency ordering for branch +1 mvninstall 13m 15s trunk passed +1 compile 13m 33s trunk passed +1 checkstyle 1m 56s trunk passed +1 mvnsite 2m 1s trunk passed +1 findbugs 2m 31s trunk passed +1 javadoc 1m 18s trunk passed       Patch Compile Tests 0 mvndep 0m 17s Maven dependency ordering for patch -1 mvninstall 0m 21s hadoop-yarn-api in the patch failed. -1 compile 2m 33s root in the patch failed. -1 javac 2m 33s root in the patch failed. -0 checkstyle 1m 47s root: The patch generated 15 new + 15 unchanged - 0 fixed = 30 total (was 15) -1 mvnsite 0m 25s hadoop-yarn-api in the patch failed. +1 whitespace 0m 0s The patch has no whitespace issues. -1 findbugs 0m 25s hadoop-yarn-api in the patch failed. -1 javadoc 0m 21s hadoop-yarn-api in the patch failed.       Other Tests -1 unit 7m 59s hadoop-common in the patch failed. -1 unit 0m 25s hadoop-yarn-api in the patch failed. +1 asflicense 0m 25s The patch does not generate ASF License warnings. 76m 39s Reason Tests Failed junit tests hadoop.security.TestKDiag Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14669 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877908/HADOOP-14669.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux d13a05c65966 3.13.0-117-generic #164-Ubuntu SMP Fri Apr 7 11:05:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / daaf530 Default Java 1.8.0_131 findbugs v3.1.0-RC1 mvninstall https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-mvninstall-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt compile https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-compile-root.txt javac https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-compile-root.txt checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/diff-checkstyle-root.txt mvnsite https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt javadoc https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-javadoc-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-api.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/testReport/ modules C: hadoop-common-project/hadoop-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api U: . Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12816/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          templedf Daniel Templeton added a comment -

          Oh, duh. Here's a patch that should work.

          Show
          templedf Daniel Templeton added a comment - Oh, duh. Here's a patch that should work.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          -1 patch 0m 4s HADOOP-14669 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



          Subsystem Report/Notes
          JIRA Issue HADOOP-14669
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877903/HADOOP-14669.002.patch
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12815/console
          Powered by Apache Yetus 0.6.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 0s Docker mode activated. -1 patch 0m 4s HADOOP-14669 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HADOOP-14669 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877903/HADOOP-14669.002.patch Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12815/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          templedf Daniel Templeton added a comment -

          Hmmm... That's odd. Let's try again.

          Show
          templedf Daniel Templeton added a comment - Hmmm... That's odd. Let's try again.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          -1 patch 0m 4s HADOOP-14669 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.



          Subsystem Report/Notes
          JIRA Issue HADOOP-14669
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877902/HADOOP-14669.001.patch
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12814/console
          Powered by Apache Yetus 0.6.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 0s Docker mode activated. -1 patch 0m 4s HADOOP-14669 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. Subsystem Report/Notes JIRA Issue HADOOP-14669 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12877902/HADOOP-14669.001.patch Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12814/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.

            People

            • Assignee:
              templedf Daniel Templeton
              Reporter:
              jlowe Jason Lowe
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development