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

Fix intermittent test failure of TestZKSignerSecretProvider

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TestZKSignerSecretProvider wait for the condition by just sleeping rolloverFrequency + 2000 millisecs. Depending on timing only is fragile and it makes test time unnecessary long.

        Issue Links

          Activity

          Hide
          iwasakims Masatake Iwasaki added a comment -
          Running org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider
          Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 90.872 sec <<< FAILURE! - in org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider
          testMultipleUnsychnronized(org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider)  Time elapsed: 18.067 sec  <<< FAILURE!
          java.lang.AssertionError: array lengths differed, expected.length=20 actual.length=19
                  at org.junit.Assert.fail(Assert.java:88)
                  at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71)
                  at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32)
                  at org.junit.Assert.internalArrayEquals(Assert.java:473)
                  at org.junit.Assert.assertArrayEquals(Assert.java:294)
                  at org.junit.Assert.assertArrayEquals(Assert.java:305)
                  at org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider.testMultipleUnsychnronized(TestZKSignerSecretProvider.java:224)
          
          Show
          iwasakims Masatake Iwasaki added a comment - Running org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 90.872 sec <<< FAILURE! - in org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider testMultipleUnsychnronized(org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider) Time elapsed: 18.067 sec <<< FAILURE! java.lang.AssertionError: array lengths differed, expected.length=20 actual.length=19 at org.junit.Assert.fail(Assert.java:88) at org.junit.internal.ComparisonCriteria.assertArraysAreSameLength(ComparisonCriteria.java:71) at org.junit.internal.ComparisonCriteria.arrayEquals(ComparisonCriteria.java:32) at org.junit.Assert.internalArrayEquals(Assert.java:473) at org.junit.Assert.assertArrayEquals(Assert.java:294) at org.junit.Assert.assertArrayEquals(Assert.java:305) at org.apache.hadoop.security.authentication.util.TestZKSignerSecretProvider.testMultipleUnsychnronized(TestZKSignerSecretProvider.java:224)
          Hide
          iwasakims Masatake Iwasaki added a comment -

          I attached 001 which replaces Thread.sleep with Mockito.verify having timeout.

          The patch makes rolloverFrequency shorter and it reduced the time to test from 108 sec to 16 sec on my machine.

          Show
          iwasakims Masatake Iwasaki added a comment - I attached 001 which replaces Thread.sleep with Mockito.verify having timeout. The patch makes rolloverFrequency shorter and it reduced the time to test from 108 sec to 16 sec on my machine.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 6m 22s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
          +1 javac 8m 16s There were no new javac warning messages.
          +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 0m 23s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 37s mvn install still works.
          +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse.
          +1 findbugs 0m 44s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 3m 50s Tests passed in hadoop-auth.
              22m 9s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12743889/HADOOP-12181.001.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / 81f3644
          hadoop-auth test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/artifact/patchprocess/testrun_hadoop-auth.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/testReport/
          Java 1.7.0_55
          uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 6m 22s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 8m 16s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 0m 23s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 37s mvn install still works. +1 eclipse:eclipse 0m 34s The patch built with eclipse:eclipse. +1 findbugs 0m 44s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 3m 50s Tests passed in hadoop-auth.     22m 9s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12743889/HADOOP-12181.001.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 81f3644 hadoop-auth test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/artifact/patchprocess/testrun_hadoop-auth.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/testReport/ Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/7176/console This message was automatically generated.
          Hide
          wheat9 Haohui Mai added a comment -

          +1. Committing.

          Show
          wheat9 Haohui Mai added a comment - +1. Committing.
          Hide
          wheat9 Haohui Mai added a comment -

          I've committed the patch to trunk and branch-2. Thanks Masatake Iwasaki for the contribution.

          Show
          wheat9 Haohui Mai added a comment - I've committed the patch to trunk and branch-2. Thanks Masatake Iwasaki for the contribution.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #8847 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8847/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #8847 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8847/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #697 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/697/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #697 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/697/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2638 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2638/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2638 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2638/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #709 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/709/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #709 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/709/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #1434 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1434/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1434 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1434/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2567 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2567/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2567 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2567/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #629 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/629/)
          HADOOP-12181. Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90)

          • hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #629 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/629/ ) HADOOP-12181 . Fix intermittent test failure of (wheat9: rev 5f688453df7191632f8556c6cb07f5b5ff605d90) hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestZKSignerSecretProvider.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          iwasakims Masatake Iwasaki added a comment -

          Thanks, Haohui Mai.

          Show
          iwasakims Masatake Iwasaki added a comment - Thanks, Haohui Mai .

            People

            • Assignee:
              iwasakims Masatake Iwasaki
              Reporter:
              iwasakims Masatake Iwasaki
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development