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

Improve exception checking in FileContext related JUnit tests

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-beta1, 2.8.2
    • Component/s: fs, test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      FileContextMainOperationsBaseTest#rename and TestHDFSFileContextMainOperations#rename do the same but different way.

      • FileContextMainOperationsBaseTest is able to distingush exceptions
      • TestHDFSFileContextMainOperations checks the files in case of error

      We should use one rename method with both advantages.

        Issue Links

          Activity

          Hide
          ajisakaa Akira Ajisaka added a comment -

          FYI: I've applied the patch with "--whitespace=fix", so the whitespace issue is fixed now.

          Show
          ajisakaa Akira Ajisaka added a comment - FYI: I've applied the patch with "--whitespace=fix", so the whitespace issue is fixed now.
          Hide
          boky01 Andras Bokor added a comment -

          Thanks a lot Akira Ajisaka!

          Show
          boky01 Andras Bokor added a comment - Thanks a lot Akira Ajisaka !
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11990 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11990/)
          HADOOP-14629. Improve exception checking in FileContext related JUnit (aajisaka: rev 9144fd9e9b5d84d71158451428341746a6567152)

          • (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java
          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11990 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11990/ ) HADOOP-14629 . Improve exception checking in FileContext related JUnit (aajisaka: rev 9144fd9e9b5d84d71158451428341746a6567152) (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed this to trunk, branch-2, and branch-2.8. Thanks Andras Bokor for the contribution!

          Show
          ajisakaa Akira Ajisaka added a comment - Committed this to trunk, branch-2, and branch-2.8. Thanks Andras Bokor for the contribution!
          Hide
          ajisakaa Akira Ajisaka added a comment -

          +1, thanks Andras.

          Show
          ajisakaa Akira Ajisaka added a comment - +1, thanks Andras.
          Hide
          boky01 Andras Bokor added a comment -

          JUnit test failures are unrelated.

          Show
          boky01 Andras Bokor added a comment - JUnit test failures are unrelated.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 8s 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 2 new or modified test files.
                trunk Compile Tests
          0 mvndep 0m 14s Maven dependency ordering for branch
          +1 mvninstall 13m 5s trunk passed
          +1 compile 13m 31s trunk passed
          +1 checkstyle 1m 53s trunk passed
          +1 mvnsite 2m 2s trunk passed
          -1 findbugs 1m 47s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings.
          +1 javadoc 1m 39s trunk passed
                Patch Compile Tests
          0 mvndep 0m 16s Maven dependency ordering for patch
          +1 mvninstall 1m 32s the patch passed
          +1 compile 10m 9s the patch passed
          +1 javac 10m 9s the patch passed
          +1 checkstyle 1m 56s root: The patch generated 0 new + 86 unchanged - 2 fixed = 86 total (was 88)
          +1 mvnsite 2m 6s the patch passed
          -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
          +1 findbugs 3m 34s the patch passed
          +1 javadoc 1m 45s the patch passed
                Other Tests
          -1 unit 8m 3s hadoop-common in the patch failed.
          -1 unit 66m 43s hadoop-hdfs in the patch failed.
          +1 asflicense 0m 40s The patch does not generate ASF License warnings.
          154m 15s



          Reason Tests
          Failed junit tests hadoop.security.TestKDiag
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure160
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailureWithRandomECPolicy
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure150
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure200
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure110
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure180
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure010
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure000
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure120
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure090
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure020
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure140
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure130
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure170
            hadoop.hdfs.server.blockmanagement.TestUnderReplicatedBlocks
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure060
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure030
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure210
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure040
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure050
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure190
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure070



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HADOOP-14629
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12876100/HADOOP-14629.01.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux a6f270afa1df 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 / 8153fe2
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html
          whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/whitespace-eol.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/testReport/
          modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: .
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/console
          Powered by Apache Yetus 0.5.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 8s 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 2 new or modified test files.       trunk Compile Tests 0 mvndep 0m 14s Maven dependency ordering for branch +1 mvninstall 13m 5s trunk passed +1 compile 13m 31s trunk passed +1 checkstyle 1m 53s trunk passed +1 mvnsite 2m 2s trunk passed -1 findbugs 1m 47s hadoop-hdfs-project/hadoop-hdfs in trunk has 10 extant Findbugs warnings. +1 javadoc 1m 39s trunk passed       Patch Compile Tests 0 mvndep 0m 16s Maven dependency ordering for patch +1 mvninstall 1m 32s the patch passed +1 compile 10m 9s the patch passed +1 javac 10m 9s the patch passed +1 checkstyle 1m 56s root: The patch generated 0 new + 86 unchanged - 2 fixed = 86 total (was 88) +1 mvnsite 2m 6s the patch passed -1 whitespace 0m 0s The patch has 2 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply +1 findbugs 3m 34s the patch passed +1 javadoc 1m 45s the patch passed       Other Tests -1 unit 8m 3s hadoop-common in the patch failed. -1 unit 66m 43s hadoop-hdfs in the patch failed. +1 asflicense 0m 40s The patch does not generate ASF License warnings. 154m 15s Reason Tests Failed junit tests hadoop.security.TestKDiag   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure160   hadoop.hdfs.TestDFSStripedOutputStreamWithFailureWithRandomECPolicy   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure150   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure200   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure110   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure180   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure010   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure080   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure000   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure120   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure090   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure020   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure140   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure130   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure170   hadoop.hdfs.server.blockmanagement.TestUnderReplicatedBlocks   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure060   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure030   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure210   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure040   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure050   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure190   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure070 Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HADOOP-14629 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12876100/HADOOP-14629.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux a6f270afa1df 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 / 8153fe2 Default Java 1.8.0_131 findbugs v3.1.0-RC1 findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/branch-findbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html whitespace https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/whitespace-eol.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/testReport/ modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs U: . Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/12732/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          boky01 Andras Bokor added a comment -

          1st patch. It removes TestHDFSFileContextMainOperations's rename and use the parent's one. This is needed for HADOOP-12802.
          It combines the advantages of the two rename methods (as I pointed in the description) and adds the ability to change JUnit4 style exception handling.

          Show
          boky01 Andras Bokor added a comment - 1st patch. It removes TestHDFSFileContextMainOperations 's rename and use the parent's one. This is needed for HADOOP-12802 . It combines the advantages of the two rename methods (as I pointed in the description) and adds the ability to change JUnit4 style exception handling.

            People

            • Assignee:
              boky01 Andras Bokor
              Reporter:
              boky01 Andras Bokor
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development